小编Xta*_*ria的帖子

jQuery Closest()不起作用

有人可以解释一下为什么要更换以下内容

$('.post_title a').hover(function () {
    $(this).parent().parent().parent().parent().find(".post_footer").toggleClass('footer_border')
});
Run Code Online (Sandbox Code Playgroud)

同

$('.post_title a').hover(function () {
    $(this).closest(".post_footer").toggleClass('footer_border')
});
Run Code Online (Sandbox Code Playgroud)

不起作用?

jquery closest

3
推荐指数
1
解决办法
7474
查看次数

标签 统计

closest ×1

jquery ×1