CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
JavaScript Jungle
Opposite of .parent() in jQuery
bor003
Permalink to comment
#
August 2009
Hi,
This might sound completely stupid but i cannot remember if there is a way to get an element inside of another eg:
<p class=\"clickable\">
<p class=\"toMove\">
</p>
</p>
So you click the clickable tabe and the one inside will open/close
Regards
Robskiwarrior
Permalink to comment
#
August 2009
$("p.clickable").click(function() {
$(this).children(".toMove").animate(blar blar);
});
Something like that would prob set you on the right path...
Mr KiTT3N
Permalink to comment
#
August 2009
you can also use .find()
Add a Comment
This might sound completely stupid but i cannot remember if there is a way to get an element inside of another eg:
So you click the clickable tabe and the one inside will open/close
Regards
$(this).children(".toMove").animate(blar blar);
});
Something like that would prob set you on the right path...