4 ms·
It is built in to many browsers. <node>.querySelector(...) and <node>.querySelectorAll(...) If all you're using jQuery for is grabbing nodes from the DOM and
by podperson 14y ago
It is built in to many browsers.
<node>.querySelector(...) and <node>.querySelectorAll(...)
If all you're using jQuery for is grabbing nodes from the DOM and attaching event listeners AND you don't care about old versions of IE then...
http://caniuse.com/queryselector http://caniuse.com/queryselector
In a nut: querySelector[All] requires IE8, addEventListener requires IE9.
- johnbender 14y agoJust to be clear, jQuery's selector syntax supports many, many things that querySelector(All) does not. http://api.jquery.com/category/selectors/jquery-selector-extensions/ http://api.jquery.com/category/selectors/jquery-selector-ext...
- HoLyVieR 14y agoIt's not many things, if you look carefully you will realize most of what is listed can be rewritten with a CSS selector. For example ":button" is the same has "button, input[type='button']". They are mostly just shorthand and that's not extra feature.