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.
I used this approach before and it indeed works better than the 2010-style jQuery mess. A good fit for userscripts too, where the problem you attempt to solve is fairly limited and having dependencies, especially with a build steps, is a pain. Note that you don't need jQuery for this at all, unless you are somehow stuck with ancient browser support as a requirement - querySelector, addEventListener, innerHtml - the basic building blocks of the approach - have been available and stable for a long time.
Unfortunately, nowadays writing userscripts is much harder than it used to be. Most websites are using some sort of reactive FE framework so you need to make extensive use of mutationObservers (or whatever the equivalent is in jQuery I guess).
Backwards compatibility. Apparently there are still some people stuck on IE11. It's nice that jQuery still supports those users and the products that they are still running.
I think anything still using ActiveX like stuff or "native" things. Sure, it should all be dead and gone, but some might not be and there is no path forward with any of that AFAIK.
jQuery made a messy ecosystem slightly less fragmented. Combined with CKEditor it effectively tamed a lot of web-developer chaos until nodejs dropped. =3
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).
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.
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...
I used this approach before and it indeed works better than the 2010-style jQuery mess. A good fit for userscripts too, where the problem you attempt to solve is fairly limited and having dependencies, especially with a build steps, is a pain. Note that you don't need jQuery for this at all, unless you are somehow stuck with ancient browser support as a requirement - querySelector, addEventListener, innerHtml - the basic building blocks of the approach - have been available and stable for a long time.
Unfortunately, nowadays writing userscripts is much harder than it used to be. Most websites are using some sort of reactive FE framework so you need to make extensive use of mutationObservers (or whatever the equivalent is in jQuery I guess).
Nice to see it still around and updated. The sad part is I guess this means React will be around in 2060.
by 2060 React Native should be up to v0.93
there are already de facto two Reacts. by 2060, there will be five.
Two Reacts!?
As someone who doesn't use React, there is React Native (for iOS & Android), and React (and that can be server-rendered or client-rendered).
There's also React Native Web
class components & function components.
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!
Unbelievably, still supports IE 11 which is scheduled to be deprecated in jQuery 5.0
Backwards compatibility. Apparently there are still some people stuck on IE11. It's nice that jQuery still supports those users and the products that they are still running.
Are those people/products upgrading jQuery though?
Who is still stuck on IE 11---and why?
I think anything still using ActiveX like stuff or "native" things. Sure, it should all be dead and gone, but some might not be and there is no path forward with any of that AFAIK.
Some corporate machines still run XP. Why upgrade what works?
SECURITY
Yet it would still run Windows Adware edition. =3
Not everybody in the world can use modern hard- and software. There are tons of school computer labs running old software
Yes, run jQuery 3.
Crazy to think that software running inside IE11 should use the latest version of a library.
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!
I cannot express how much I admire the amount of effort jQuery puts into their upgrade tools.
jQuery is the last time I felt a library doing magic! Nothing has matched the feelings since then.
Not even modern vanilla JavaScript?
I remember being scared of jQuery and then being scared of vanilla JS. My, how time flies.
Incredible it's still being maintained.
The first time I truly enjoyed web development was when I got the hang of jQuery. Made everything so much simple and usable!
jQuery made a messy ecosystem slightly less fragmented. Combined with CKEditor it effectively tamed a lot of web-developer chaos until nodejs dropped. =3
This is huge. jQuery is still my way to go for any website requiring some custom interaction that isn't available in vanilla js.
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.
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).
WordPress ships with 3.x and is already looking to update to 4
still needs more jQuery
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.
Zepto! That's a name I haven't heard in years. I don't remember how it happened but I'm still a member of the ZeptoJS org on Github.
No love for $…?
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
jQuery does a lot more though, and includes support older browsers.
> includes support older browsers
Which is entirely the issue. Supporting a browser for the 10 users who will update jQuery in 2025 is insane.