Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's Zepto.js alternative to jQuery's $(this).parent().parent().find('.active')?

What's Zepto.js alternative to jQuery's $(this).parent().parent().find('.active')?

like image 271
Ken Avatar asked Dec 08 '10 13:12

Ken


2 Answers

This question is about 4 months old and the Zepto framework gets updated pretty regularly.

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

According to the git repo source tree, this support was added in Dec 20, 2010 by Mislav Marohnić (commit hash 784de340).

like image 191
Mauvis Ledford Avatar answered Sep 22 '22 13:09

Mauvis Ledford


I don't see a .parent() method in the API, so you might just have to do this (untested!):

$($(this).get(0).parentNode.parentNode).find('.active').hide();
like image 20
karim79 Avatar answered Sep 24 '22 13:09

karim79