Reputation: 2805
I want to access all the subelelements of a given element . For ex :
<div id="main">
<div id="1">
<span></span>
<span></span>
</div>
<span></span>
<div></div>
</div>
Like in abover structure #main
contains 5 elements ( 2 div and 3 span ). How can i access it all in a single query ?
Upvotes: 0
Views: 169
Reputation: 4399
All you need is a wildcard selector, like this:
$("#main *")
Upvotes: 2