What is Zepto.js, alternative to jQuery $ (this) .parent (). Parent (). Find ('. Active')?

What is the Zepto.js jQuery alternative $(this).parent().parent().find('.active')?

+5
source share
4 answers

I do not see the method .parent()in the API , so you just need to do this (untested!):

$($(this).get(0).parentNode.parentNode).find('.active').hide();
+4
source

This question is about 4 months, and the Zepto system is regularly updated.

$(this).parent().parent().find('.active') it works now.

According to the git source repo tree, this support was added on December 20, 2010 by Mislan Maronic (commit hash 784de340).

+9
source

zepto - Element#up . closest. , .

$(this).closest("div.parentclass").find('.active')
+3
source

Zepto has since implemented the .parent () method. See http://zeptojs.com/#parent

+1
source

All Articles