all selector
Description: Selects all elements.
version added: 1.0jQuery( "*" )
Caution: The all, or universal, selector is extremely slow, except when used by itself.
Examples:
Example 1
Find every element (including head, body, etc) in the document. Note that if your browser has an extension/add-on enabled that inserts a <script>
or <link>
element into the DOM, that element will be counted as well.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
Demo:
Example 2
Find all elements within document.body so elements like head, script, etc. are excluded.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |