4 ms·
I've seen projects that use jQuery just for the selector part, nothing else is used. Selectors are a core strength of jQuery. With document.querySelector, I wou
by _RPM 11y ago
I've seen projects that use jQuery just for the selector part, nothing else is used. Selectors are a core strength of jQuery. With document.querySelector, I wouldn't even include jQuery in a new project. `window.addEventListener` isn't much different than .on
- overcast 11y agoIt's used out of convenience, and avoiding errors. jQuery selectors are stupidly simple to do complex stuff with. I just wish they had a jQuery.selector distribution.
- jeresig 11y agoIt does! https://github.com/jquery/sizzle/blob/master/dist/sizzle.js https://github.com/jquery/sizzle/blob/master/dist/sizzle.js
- overcast 11y agoI looked at sizzle, but is it just me, or is the syntax not anywhere near as convenient as jQuery? Doesn't seem like it's making anything easier.
- kyriakos 11y agoI mostly use it because it's a dependency in so many other stuff that I end up using in my projects.