Let's say I have a hierarchy of elements, with #root at its root. I can use $('#root > * > *') to get all its grandchildren. Is there any way I could do that if I already have $('#root')?
$('#root').find('* > *') is definitely not it, as it will happily "start" from any descendant for the first star, not just #root children.
Is there any function in jQuery that would "anchor" at the current element, starting with its children or itself? It's been bugging me for a while, and I couldn't find anything similar in the docs.
Description of your first forum.
2 posts • Page 1 of 1
.find() is possibly the single most annoying jQuery traversal method, ever.
Who is online
Users browsing this forum: No registered users and 1 guest