Response title
This is preview!
- // Fast:
- $( "#container div.robotarm" );
- // Super-fast:
- $( "#container" ).find( "div.robotarm" );
The.find()
approach is faster because the first selection is handled without going through the Sizzle selector engine – ID-only selections are handled usingdocument.getElementById()
, which is extremely fast because it is native to the browser.
© 2013 jQuery Foundation
Sponsored by and others.