Adam Lee
Adam Lee

Reputation: 25748

How to get all the descendants of an elements?

I know I can use parents to get all the ancestors. but it looks like children only return all the direct child. How to get all the descendants of an elements?

Upvotes: 0

Views: 77

Answers (1)

GregL
GregL

Reputation: 38121

Use the .find("*") syntax to find everything.

e.g.

$(element).find('*');

Upvotes: 2

Related Questions