jquery - How to target all children, not just first level? -
this target first level children:
$(this).children()
how can target children not first level, childrens children , on?
from jquery docs:
unlike of tree traversal methods, selector expression required in call .find(). if need retrieve of descendant elements, can pass in universal selector '*' accomplish this.
you need add selector within .find() (unlike .children()), add asterisk.
hence, $(this).find('*');
Comments
Post a Comment