The mainstream opinion seems to be that jQuery is outdated because vanilla JavaScript can work uniformally across virtually all modern browsers.<p>But I've been playing around with jQuery for the first time and wow - it's much more enjoyable to work with than vanilla JavaScript is.<p>Granted I don't work with JavaScript professionally (I use Java at work) so I might be overlooking jQuery cons that only become apparent in large professional codebases.
> jQuery is used by 93.4% of all the websites whose JavaScript library we know.<p><a href="https://w3techs.com/technologies/details/js-jquery" rel="nofollow">https://w3techs.com/technologies/details/js-jquery</a><p>Maybe jQuery is seen as outdated in the backend world, but I can assure you that in the webdev world jQuery and Javascript are almost entirely synonymous.<p>Someone might try to say that hammers are outdated in a world where a nailgun exists, but I can assure you the hardware store sells a lot more hammers than they do nailguns. (In this analogy jQuery would be a hammer and vanilla javascript would be pounding in nails with a big dumb rock).
Modern frontend frameworks like React, Vue, and Angular provide their own state management and DOM manipulation approaches that are more efficient than jQuery's direct DOM manipulation
At one point, jQuery was so overrated that when I searched Google for JavaScript alert syntax, it came up with a similar StackOverflow question, where the top answer used jQuery to call it.<p>There were other responses to the StackOverflow question, which managed to call an alert with just the single method call, but the top answer loaded in the entire jQuery library, to place a single native call.
In the old days (TM) jquery made things easy and cross platform (all browsers). It could literally take any parameter (string, array, function, ...) and mostly did magically what the dev expected. It is very intuitive and productive. For small(ish) things this is great and saves time and money.<p>However, this came at a cost: performance<p>Usually user experience is more important than developer experience at a certain breakpoint. As long as everything feels snappy, jquery is OK, but as soons as the APP starts getting slower, you just can't get along.<p>I'm not saying jQuery is slow in General but some things are (Dom, eventhandling) slower than native stuff and this sums up. Not to talk about highly optimized "Compile time" libs like svelte.