什么是Zepto.js替代jQuery的$(this).parent().parent().find('.active')?

Ken*_*Ken 5 javascript zepto

什么是Zepto.js替代jQuery$(this).parent().parent().find('.active')

Mau*_*ord 9

这个问题大约有4个月了,Zepto框架会定期更新.

$(this).parent().parent().find('.active') 现在有效.

根据git repo源代码树,这个支持在2010年12月20日由MislavMarohnić(commit hash 784de340)添加.


kar*_*m79 4

我在API.parent()中没有看到方法,因此您可能只需要执行此操作(未经测试!):

$($(this).get(0).parentNode.parentNode).find('.active').hide();
Run Code Online (Sandbox Code Playgroud)