by blakewatson
2 subcomments
- Related: This is a nice write-up of how to write reactive jQuery. It's presented as an alternative to jQuery spaghetti code, in the context of being in a legacy codebase where you might not have access to newer frameworks.
https://css-tricks.com/reactive-jquery-for-spaghetti-fied-le...
- Whenever HTMX comes up here, I always think "isn't that just some gobbledy-gook which replaces about 3 lines of imperative jquery?"
Anyway, jQuery always did the job, use it forever if it solves your problems.
- Still one of my favourite libs on the whole planet. I will always love jQuery. It is responsible for my career in (real) companies.
Live on jQuery! Go forth and multiply!
- I love jQuery and it’s elegant methods chaining over object / array of DOM elements you keep in the chain.
15+ years ago I wrote a tutorial for french people about using jQuery, it got a lot of views. I hope it helped spread jQuery.
- Nice to see it still around and updated. The sad part is I guess this means React will be around in 2060.
- jQuery was very useful when many features were missing or not consistent/standardized between browsers. Nowadays, JS / DOM API is very rich, mature and standardized. So, jQuery is not as necessary as it was before.
https://youmightnotneedjquery.com/
Yes, sometimes the vanilla JS analogs are not the most elegant, but the vast majority are not terribly complicated either.
IMHO, another advantage of vanilla JS (aside from saving ~30KB) is potentially easier debugging. For example, I could find / debug the event listeners using the dev tools more easily when they were implemented via vanilla JS, since for complicated event listeners I had to step through a lot of jQuery code.
- That bit about focus event order gave me flashbacks and raised my heart rate by a couple of bpm. Had some bad times with that ~15 years ago!
- It's amazing how much jQuery is still used today. Even on modern websites you can often find it included (browser devtools -> jQuery in the console, and see). And not just on hobbyist sites, but on serious company websites and their web tools as well.
by pocketarc
1 subcomments
- > includes some breaking changes
Most of the changes are completely reasonable - a lot are internal cleanup that would require no code changes on the user side, dropping older browsers, etc.
But the fact that there are breaking API changes is the most surprising thing to me. Projects that still use jQuery are going to be mostly legacy projects (I myself have several lying around). Breaking changes means more of an upgrade hassle on something that's already not worth much of an upgrade hassle to begin with. Removing things like `jQuery.isArray` serve only to make the upgrade path harder - the internal jQuery function code could literally just be `Array.isArray`, but at least then you wouldn't be breaking jQuery users' existing code.
At some point in the life of projects like these, I feel like they should accept their place in history and stop themselves breaking compatibility with any of the countless thousands (millions!) of their users' projects. Just be a good clean library that one can keep using without having to think about it forever and ever.
by rationably
3 subcomments
- Unbelievably, still supports IE 11 which is scheduled to be deprecated in jQuery 5.0
- I cannot express how much I admire the amount of effort jQuery puts into their upgrade tools.
by admiralrohan
2 subcomments
- What is the usecase for this in the age of React, NextJS? And for static sites we have Astro etc.
And even if you need something simple why use jQuery? Vanila JS has better API now. Am I missing anything?
by jusonchan81
1 subcomments
- The first time I truly enjoyed web development was when I got the hang of jQuery. Made everything so much simple and usable!
- I thought this would include more drastic changes, but it seems that this is more house cleaning stuff, like, "nobody should really be using this in 2026". They are providing a library for someone who really likes jQuery and wants to use it over something like React. (Which is completely fine and reasonable.)
Looks like the core behavior doesn't change, something that people complain about, e.g. https://github.blog/engineering/engineering-principles/remov...
> This syntax is simple to write, but to our standards, doesn’t communicate intent really well. Did the author expect one or more js-widget elements on this page? Also, if we update our page markup and accidentally leave out the js-widget classname, will an exception in the browser inform us that something went wrong? By default, jQuery silently skips the whole expresion when nothing matched the initial selector; but to us, such behavior was a bug rather than a feature.
I completely agree with this, because I have been bitten so many times by this from subtle bugs. However I can see some other people not caring about any of it.
I already know that I am definitely not going to use jQuery in my personal projects, and there is no chance that my workspace does. (I much prefer letting a framework handle rendering for me based on data binding.) So none of that concerns me. But good luck to jQuery and anyone who sticks with it.
- jQuery was peak JavaScript.
Good times, I'm glad it is still around.
- Everything I ever used jquery for 15 years ago, I found myself able to do with the CSS and the JS standard library maybe 10 years ago. I honestly am confused when I see jquery used today for anything.
Is there still anything jquery does you cannot easily do with a couple lines of stdlib?
by NetOpWibby
0 subcomment
- I remember being scared of jQuery and then being scared of vanilla JS. My, how time flies.
Incredible it's still being maintained.
- I still love the simplicity a ajax call can be done in Jquery
- jQuery is the last time I felt a library doing magic! Nothing has matched the feelings since then.
by shevy-java
0 subcomment
- I am still using jQuery.
by indolering
0 subcomment
- I love that they support ES6 modules, Trusted Types, and CSP! The clearing out of old APIs that have platform replacements is nice to see too!
- is there any reason to use jquery if you've never used it before
- This is huge. jQuery is still my way to go for any website requiring some custom interaction that isn't available in vanilla js.
- Hmm maybe i can finally move on from 2.x
by rtbruhan00
0 subcomment
- It’s refreshing to see jQuery 4
by MarkdownConvert
0 subcomment
- Long-time user here. It served me well for years, though I haven't really touched it since the 3.0 days. Glad to see it's still being maintained.
- I used jQuery for the past ~ 10 years on smaller apps and I had no problems with it. Then I slowly replaced it with modern JS wherever possible and I found that today I am using jQuery only because Datatables.js depends on it.
It was a nice ride, many thanks to the people that worked and still work on it. Not sure we'll ever see a jQuery 5, but that's life.
by netbioserror
1 subcomments
- I was surprised that for most of my smaller use cases, Zepto.js was a drop-in replacement that worked well. I do need to try the jQuery slim builds, I've never explored that.
- still needs more jQuery
- No love for $…?
- jQuery is v4 now, but a lot of sites esp. wordpress still have 1.11 or 1.12 and only uses them to either doing modals(popover), show/hide(display), or ajax(fetch).
by thrownawaysz
2 subcomments
- The group photo is a perfect example of why DEI is important
- Even after migrating to ES modules, jQuery is still somewhat bloated. It is 27 kB (minified + gzipped) [0]. In comparison, Preact is only 4.7 kB [1].
[0]: https://bundlephobia.com/package/jquery@4.0.0
[1]: https://bundlephobia.com/package/preact@10.28.2