|
1) It's jQuery, not "JQuerry". I've been using it since 2008, and Prototype.js and script.aculo.us before that. 2) For quick prototypes, I can't imagine why you'd need to accommodate pre-HTML5 HTML. We're discussing quick prototypes, not production sites targeting browsers going back a decade. 3) VanillaJS equivalents are slightly longer than jQuery snippets, mostly because the API names are a bit longer: css: // jQuery
newDiv.addClass('foo');
// Vanilla
newDiv.classList.add('foo');
siblings: // jQuery
const nextElement = $('#wrap').next();
// Vanilla
const nextElement = document.querySelector('wrap').nextSibling;
etc etc.If the extra verbosity bothers you, you can always alias `document.querySelector` as `$`, or `sel`, or whatever. Then you get stuff like: // jQuery
const nextElement = $('#wrap').next();
// Vanilla
const nextElement = sel('wrap').nextSibling;
And yes, the jQuery method names are a little shorter, but for quick prototyping, I'd rather use something that I know can be run on any modern browser, with no build step or library required. For production apps, I'll 99% of the time use a framework, either React or Vue.js.I get that not everyone prefers that. That's OK. |
JQuerry might not be the tool for your job but this not makes the fact it's API is nicer, powerful then pure JS . check the anti-jQuerry page http://youmightnotneedjquery.com and you will see that in the end you have to reinvent yor own jQuerry