jQuery 4

by OuterValeon 1/18/2026, 4:23 AMwith 299 comments

by usere9364382on 1/19/2026, 1:29 AM

For the record, JQuery is NOT to blame for the so called spaghetti code. Most people seem to blame JQuery for their own short coming. Most people also do not seem to understand the genius that was contained in JQuery. See "http://eyeandtea.com/crxcmp" for an example of what could already be done with JQuery in the IE8 era. A lot of the things later invented in the browser were to mask these shortcomings instead of admitting to them. The shadow DOM is one example. JQuery already had a feature that rendered the shadow DOM unnecessary, but it would require discipline that most developers did not have nor understand.

Having said that, after JQuery 1.x, and in particular, the changing, the deprecating, and the dropping of things here and there, JQuery no longer made sense. Somewhat similar to the SDL situation in the C/C++ word. An important role of JQuery, similar to SDL, was a strong code contract before anything else, and if the developer now has to account for JQuery's version differences like having to account for browser differences, what is the point.

by alnicoon 1/18/2026, 5:37 PM

Congrats to everyone involved in the jQuery 4.0 release.

For what it’s worth, if you’re looking for a more structured approach on top of jQuery, JsViews (https://jsviews.com) provides a reactive templating and data-binding system that’s been around and stable for many years.

It hasn’t seen the same level of adoption as newer frameworks, but it may still be of interest to people who prefer the jQuery ecosystem.

by chao-on 1/18/2026, 7:27 AM

I cannot express how much I admire the amount of effort jQuery puts into their upgrade tools.

by karim79on 1/18/2026, 5:54 AM

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!

by ksecon 1/18/2026, 4:14 PM

20 Years! I remember when jQuery first release I thought in 5 to 10 years time we wont need jQuery because everything jQuery has will be built into the browser or becomes part of HTML Spec.

But then Google, Chrome, iPhone, PWA or JS for everything took over and took a completely different path to what I imagine webpage would be.

by lrvickon 1/18/2026, 9:07 AM

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 flomoon 1/18/2026, 8:42 AM

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.

by blakewatsonon 1/18/2026, 6:12 AM

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...

by jusonchan81on 1/18/2026, 6:10 AM

The first time I truly enjoyed web development was when I got the hang of jQuery. Made everything so much simple and usable!

by gethlyon 1/18/2026, 8:31 AM

jQuery was peak JavaScript.

Good times, I'm glad it is still around.

by b3ingon 1/18/2026, 5:14 AM

Nice to see it still around and updated. The sad part is I guess this means React will be around in 2060.

by senfiajon 1/18/2026, 1:02 PM

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.

by ulrischaon 1/18/2026, 8:25 AM

I still love the simplicity a ajax call can be done in Jquery

by rationablyon 1/18/2026, 5:06 AM

Unbelievably, still supports IE 11 which is scheduled to be deprecated in jQuery 5.0

by thmon 1/18/2026, 4:41 PM

Okay, your turn, script.aculo.us & Mootools.

by NetOpWibbyon 1/18/2026, 7:10 AM

I remember being scared of jQuery and then being scared of vanilla JS. My, how time flies.

Incredible it's still being maintained.

by ttoinouon 1/18/2026, 11:58 AM

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.

by maxperton 1/18/2026, 7:44 AM

jQuery is the last time I felt a library doing magic! Nothing has matched the feelings since then.

by nilslindemannon 1/19/2026, 12:16 PM

JQuery is cool because it does not try to replace the HTML. Progressive_Enhancement / Graceful Degradation is possible with jQuery, something which the new Frameworks, Svelte, React, etc., have forgotten / never learned.

by hypnoton 1/18/2026, 9:52 AM

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 Pikamander2on 1/18/2026, 2:20 PM

That changelog is wild; it closes out dozens of issues that have been open on Github for 5+ years. I assume that's related to this being the first new major version in years.

Has anyone done any benchmarks yet to see how jQuery 4 compares to jQuery 3.7?

by giancarlostoroon 1/18/2026, 7:26 PM

Much like I am sure anyone else who started doing web dev in the 2000s and 2010s before SPA frameworks were as prevalent I learned web development scripting with jQuery and I am happy to see its still around. Theres so many things I built on top of jQuery in those early years that likely still work. Kudos to the team.

by netbioserroron 1/18/2026, 5:48 AM

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.

by pocketarcon 1/18/2026, 12:35 PM

> 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 shevy-javaon 1/18/2026, 8:41 AM

I am still using jQuery.

by goykasion 1/18/2026, 4:51 PM

Ive never been a frontend guy, although I was a heavy user of jquery when I needed it. But I cant help but stick to my roots.... LONG LIVE PROTOYPE!

by MarkdownConverton 1/18/2026, 5:35 AM

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.

by t1234son 1/18/2026, 10:07 PM

If you are using server side rendering is jQuery or native JS all you need or is is still worth looking into more complicated JS frontends?

by indoleringon 1/18/2026, 7:19 AM

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!

by AdrianB1on 1/18/2026, 11:35 AM

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 erichansonon 1/19/2026, 2:32 AM

I love jQuery syntax. It's still way tigheter than standards-based stuff, never understood all the crapping on it.

by sodafountanon 1/18/2026, 7:21 PM

Wow, this is interesting to see. I thought jQuery was dead.

My next question would be, is this something that OpenAI and Anthropic would train their data on? If I ask Claude Code to write an app and utilize jQuery, would it resolve to the previous version until it's retrained in a newer model?

by thr0waway001on 1/18/2026, 9:37 PM

Good ol' jQuery.

Thank you for everything you've done for us.

by thrownaway561on 1/18/2026, 10:02 PM

Congrats on shipping!!!! It's been a long time since I've written any jQuery but I remember how wonderful it was to work with in the age of browser inconstancies. Thank you EJohn and the team for continuing the project.

by bikamonkion 1/18/2026, 2:18 PM

For us that started doing web apps as soon as the web was invented, JQ was a miracle.

Thanks guys!

by markandrewjon 1/21/2026, 4:54 PM

I personally don't have a need for JQuery anymore, but I still have a lot of respect for John Resig.

by zghston 1/18/2026, 9:05 PM

I feel so old. jQuery was hate/ok early in my career, as I started on the tail end of HTML5/in the middle of ES6 with all the new stuff.

by padjoon 1/18/2026, 1:10 PM

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!

by madducion 1/18/2026, 7:24 AM

This is huge. jQuery is still my way to go for any website requiring some custom interaction that isn't available in vanilla js.

by tanseydavidon 1/20/2026, 2:52 PM

"jQuery?!?! We use J-jQuery" -Jack Borrough (Senior Javascript Developer)

by yreadon 1/18/2026, 8:04 AM

Hmm maybe i can finally move on from 2.x

by g947oon 1/18/2026, 12:45 PM

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.

by masfoobaron 1/19/2026, 11:17 AM

I remember the first time I tried jQuery -- which was 2009.

Before jQuery, I had vanilla JS code that factored in Safari, Firefox, Opera... and... IE6, IE7, and then IE8 which was (from memory) recent at the time.

Trying to design a visual drag n' drop editing interface on the web was a chore at the time especially with the differences in IE browsers! It was suprising how many customers were still using IE6!

A lot of this is purely by memory, now. I even have shivering memories reminding myself I was using VB.NET with ASP.NET Web forms. I really HATED it!

I remember ASP.NET provided dynamic web pages with things like Placeholder tag, etc. Again, It felt bloated even back then but I made it work. It was a balance of using what was recommended by other developers, and trying to ensure performance is good.

By around end of 2009, I tried jQuery as an experimental branch and very impressed with its capabilities. Despite being a decent Javascript developer at the time I was inexperienced with AJAX (Technically I was a Junior dev in ways) but jQuery shows me the way. It was not long before I ditched certain features of .NET Web Forms for jQuery.

At the time, there may have been a little overhead replacing various javascript code I am written with jQuery but the rewards were high. It was cleaner frontend and backend code, thanks to simple AJAX calls.

Since then I've always had huge respect for jQuery! While I don't consider myself a decent javascript as I don't use it much. However, when I do come back to web development, I cannot be asked with the modern ways. To me it's bloat. I just stick with htmx, now. If I have do some fancy things visually then I will use jQuery.

by johanycon 1/18/2026, 10:13 AM

is there any reason to use jquery if you've never used it before

by nprateemon 1/18/2026, 5:27 PM

What's jquery? I only use dynamic drive for my DHTML

by alphax314on 1/18/2026, 4:28 PM

Amazing oss library, glad its still being maintained!

by nashashmion 1/18/2026, 2:28 PM

I wish it also included support for XPath Query.

by admiralrohanon 1/18/2026, 12:58 PM

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 rtbruhan00on 1/18/2026, 11:02 AM

It’s refreshing to see jQuery 4

by kordlessagainon 1/18/2026, 5:50 PM

Wow. Great job.

by recursivedoubtson 1/18/2026, 5:54 PM

hail to the king

by kordlessagainon 1/18/2026, 5:51 PM

Now what we need is realtime log forwarding from js to the llm.

by tpoacheron 1/18/2026, 7:08 AM

still needs more jQuery

by fourseventyon 1/18/2026, 7:07 PM

Now that's a name i've not heard in a long time...

by tonijnon 1/18/2026, 5:48 AM

No love for $…?

by gocsjesson 1/18/2026, 6:54 AM

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 maxlohon 1/18/2026, 5:19 AM

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