News for hackers. Stuff that matters.
Re:jQuery 4.1.0 by CM30 on Tuesday November 17, 2026 @04:03PM (#50538146)
I'm a tad surprised jQuery still exists, though it's kinda neat it does. Always interesting to see historical projects with less and less modern day relevance get continued like this.

And while most of the use cases for jQuery have long since died out with things like classList, querySelector, etc, I do feel there's probably value in a framework that focuses on minor enhancements to a site rather than being the backbone of the whole thing. Like if you want a React or Angular or Vue equivalent, something like jQuery would be a terrible choice, but a lot of sites are static ones where the only scripting needed would be for minor things like dropdown menus or slideshows, and I can see a modern, lean library like this being a decent choice there.

Re:jQuery 4.1.0 by liendolucas on Tuesday November 17, 2026 @04:08PM (#50538214)
I would probably use Hyperscript for that use case: https://hyperscript.org/
Re:jQuery 4.1.0 by Exoristos on Tuesday November 17, 2026 @06:08PM (#50539529)
[delayed]
Re:jQuery 4.1.0 by liendolucas on Wednesday November 18, 2026 @05:32AM (#50544496)
Why a meme language? Have you actually tried?
Re:jQuery 4.1.0 by proneb1rd on Tuesday November 17, 2026 @04:08PM (#50538217)
I wonder how many websites on the web still use jquery today
Re:jQuery 4.1.0 by ramesh31 on Tuesday November 17, 2026 @04:12PM (#50538253)
>I wonder how many websites on the web still use jquery today

Probably more than use React, by total domains alone. It's a bit like WordPress; so ubiquitous you forget it's even there, and with a long tail that will outlive many people reading this.

Re:jQuery 4.1.0 by wouldbecouldbe on Tuesday November 17, 2026 @04:26PM (#50538423)
well its actually ship by wordpress, although not turned on my default, most themes and plugins do. So that already makes up for a huge part of the internet.
Re:jQuery 4.1.0 by xp84 on Tuesday November 17, 2026 @05:14PM (#50539008)
yup. we still had it on every page at my last job, even though it was a 100% React frontend (literally - even things like error pages were done with JSX for some reason!) merely because when the first parts of the site were written, they used $.ajax instead of fetch for some reason, and they never wanted to refactor anything.
Re:jQuery 4.1.0 by noduerme on Tuesday November 17, 2026 @05:31PM (#50539208)
fetch only became available in 2015 and it was awhile before it was commonly supported. At the time, jQuery's ajax was much nicer than handling the XMLHttpRequest yourself. I have sites that have gone through all three, finally replacing $().ajax with fetch only in the last couple years.
Re:jQuery 4.1.0 by xp84 on Tuesday November 17, 2026 @11:12PM (#50541781)
That’s gotta be it. I think the older parts of the codebase definitely either predated 2015 or straddled the time where you couldn’t assume fetch was there. And I agree, XHR was actually pretty absurd, having used it in about 2006 before discovering JQ.
Re:jQuery 4.1.0 by noduerme on Wednesday November 18, 2026 @03:48AM (#50543646)
Yeah. And also, 2015 was the same time when Promises became part of the spec. That was the justification for fetch in the first place. So, $().ajax still handled its results with callbacks, it wasn't async, although it was easy enough to wrap. You wouldn't necessarily replace it until you were ready to rewrite a whole bunch of other stuff in your code with async functions. For me, a bigger question for older code was transitioning the bulk of the code to promise patterns, even though I would've otherwise wanted to swap fetch for ().ajax much sooner.
Re:jQuery 4.1.0 by nchmy on Wednesday November 18, 2026 @06:01AM (#50544742)
Every wp site uses jquery
Re:jQuery 4.1.0 by kevin_thibedeau on Tuesday November 17, 2026 @05:16PM (#50539029)
StackOverflow still does. Delivered via Google for no good reason other than to give them tracking data on SO users.
Re:jQuery 4.1.0 by sigzero on Tuesday November 17, 2026 @05:24PM (#50539120)
If you believe a google query:

Approximately 64% of all websites—or roughly 67 million live domains—currently use jQuery.

Re:jQuery 4.1.0 by cantalopes on Tuesday November 17, 2026 @06:29PM (#50539702)
A lot actually
Re:jQuery 4.1.0 by dalemhurley on Tuesday November 17, 2026 @04:12PM (#50538250)
There is a heap of indie devs that swear by jQuery and avoid the frameworks like react. Each has their use cases.
Re:jQuery 4.1.0 by smt88 on Tuesday November 17, 2026 @04:27PM (#50538442)
[delayed]
Re:jQuery 4.1.0 by reassess_blind on Tuesday November 17, 2026 @04:56PM (#50538800)
Valid questions. In jQuery's case it's still so widely used by older codebases that it makes sense to improve and keep maintained. I think it's important to have alternatives in any case. Some people still prefer to write code by hand, and some people prefer jQuery.
Re:jQuery 4.1.0 by mathgeek on Tuesday November 17, 2026 @04:58PM (#50538823)
I wouldn't say there are _many_ use cases, but "LLM is writing code in a legacy codebase without heavy refactors" fits your question.
Re:jQuery 4.1.0 by SoftTalker on Tuesday November 17, 2026 @05:02PM (#50538871)
Same reason we've always sacrificed performance for syntactic sugar. Readability and maintainability are the big ones. If you trust your AI to get it right, sure I guess that doesn't matter.
Re:jQuery 4.1.0 by smt88 on Tuesday November 17, 2026 @05:58PM (#50539454)
[delayed]
Re:jQuery 4.1.0 by nilamo on Tuesday November 17, 2026 @05:04PM (#50538890)
Vanilla JS only works with a recent browser. JQuery works with old garbage people never updated.
Re:jQuery 4.1.0 by saidinesh5 on Tuesday November 17, 2026 @05:22PM (#50539092)
But what old garbage browsers are still in use?
Re:jQuery 4.1.0 by TonyTrapp on Tuesday November 17, 2026 @05:33PM (#50539229)
More than you'd think if you start looking outside of the western tech bubble. Not everyone across the whole globe can afford the latest and greatest phones or laptops.
Re:jQuery 4.1.0 by smt88 on Tuesday November 17, 2026 @06:01PM (#50539478)
[delayed]
Re:jQuery 4.1.0 by skydhash on Tuesday November 17, 2026 @06:28PM (#50539693)
Single download is better than multiple small downloads.
Re:jQuery 4.1.0 by majewsky on Tuesday November 17, 2026 @06:41PM (#50539831)
Ain't no law saying that you can't bundle multiple polyfills.
Re:jQuery 4.1.0 by skydhash on Tuesday November 17, 2026 @06:47PM (#50539898)
You can. And that's how you get jQuery
Re:jQuery 4.1.0 by Timon3 on Tuesday November 17, 2026 @07:59PM (#50540508)
Is "modern" jQuery tree-shakeable? If not, individual polyfills will be way smaller.
Re:jQuery 4.1.0 by nchmy on Wednesday November 18, 2026 @05:57AM (#50544697)
But you don't need the latest and greatest phone to have the latest browser. Android 10 (released in 2019) supports the latest chromium versions and android 8 (2017) and 9 (2018) support up to v138.
Re:jQuery 4.1.0 by starkparker on Tuesday November 17, 2026 @05:34PM (#50539245)
jQuery 3.8.0 was also part of this release (if "as a send-off, not a comeback" per the announcement[1]), and it supports IE 9-10, legacy Edge, iOS 7+, and Android 4.0+.

We just had a T1 line blow up the entire US air control infrastructure, so I'll happily assume people are still using old garbage in critical workflows.

1: https://blog.jquery.com/2026/11/17/jquery-4-1-0-and-3-8-0-re...

Re:jQuery 4.1.0 by smt88 on Tuesday November 17, 2026 @06:01PM (#50539473)
This is absolutely not a reason to use jQuery. This reason is 15+ years old.

First, modern vanilla JS APIs have been available for more than ten years. A browser without them is absolutely ancient.

And for the browsers that are truly that old, you can use nearly-weightless polyfills instead of jQuery.

Re:jQuery 4.1.0 by olmo23 on Wednesday November 18, 2026 @09:06AM (#50546492)
> old garbage people never updated

hot take: we should not be supporting them.

(i get that this is a hard sell if you use your website to make money)

Re:jQuery 4.1.0 by xp84 on Tuesday November 17, 2026 @05:11PM (#50538975)
Serious question: On modern hardware how much performance is jQuery actually taking away from you? Compared to the ridiculous overkill factor of using React for simple static pages, a practice I see everywhere now, the time it takes jQuery to parse seems inconsequential.
Re:jQuery 4.1.0 by saidinesh5 on Tuesday November 17, 2026 @05:20PM (#50539072)
Not sure about "modern hardware" but I think the comparison is between jQuery vs. Vanilla JS on "modern browsers".

My only data point was my Blog felt significantly snappier on my 5 year old phone - especially on bad 4G connections - when i simply ditched jQuery and used Vanilla JS.

> The latest version of jQuery (v4.0.0) is 76.8 kB minified and 27.0 kB minified + gzipped.

Re:jQuery 4.1.0 by treve on Tuesday November 17, 2026 @08:54PM (#50540907)
[delayed]
Re:jQuery 4.1.0 by smt88 on Tuesday November 17, 2026 @06:02PM (#50539490)
[delayed]
Re:jQuery 4.1.0 by proxyscore on Tuesday November 17, 2026 @07:10PM (#50540119)
Yes and reading resigs book on how he made jquery, well I can't say anything but the guy was a genius way ahead of it's time.
Re:jQuery 4.1.0 by nchmy on Wednesday November 18, 2026 @05:53AM (#50544667)
Have a link to this book?
Re:jQuery 4.1.0 by chuckadams on Tuesday November 17, 2026 @04:30PM (#50538464)
jQuery collections are much much nicer than the incredibly anemic NodeList you get from querySelector, which doesn't even implement a full JS Array. You can set states on every element matching a jQuery selector as if it were a single element. I don't personally use jQuery very often since I prefer declarative components, but if I'm whipping up something imperative like a user script, it's hard to beat jQuery's "lenses for the DOM", as one Haskell programmer put it.
Re:jQuery 4.1.0 by abanana on Tuesday November 17, 2026 @05:25PM (#50539124)
> set states on every element matching a jQuery selector

Very much so. jQuery had 2 major selling points - (1) browser polyfills and (2) conciseness, as per their motto, "Write less, do more". It seems (2) has been largely forgotten since (1) has been rendered obsolete. Its idea of running functions on a collection often made scripts end up at one-third to one-half of the equivalent vanilla JS, which needs loops to do the same thing.

Re:jQuery 4.1.0 by nixpulvis on Tuesday November 17, 2026 @05:30PM (#50539194)
Love me some jQuery. I honestly think the web would be in a better place if we hadn't stopped using HS for things like little jQuery scripts and kept the servers doing the controllers and handling the models.
Re:jQuery 4.1.0 by recursive on Tuesday November 17, 2026 @05:25PM (#50539137)
That's a lot of stuff just for [...nodeList].
Re:jQuery 4.1.0 by chuckadams on Tuesday November 17, 2026 @05:36PM (#50539272)
jQuery predates that syntax, but have fun chaining that even now.
Re:jQuery 4.1.0 by recursive on Tuesday November 17, 2026 @06:45PM (#50539882)
jQuery had a lot of reasons for existing. And now it has less than it used to. I believe that was the point.

You'd probably usually chain that inside the callback. Instead of addClass('foo').hide(), you'd do el.classList.add('foo'); el.hidden = true; or something. It's not 1:1, but also it's not really that big a deal.

Re:jQuery 4.1.0 by wvbdmp on Tuesday November 17, 2026 @05:33PM (#50539224)
The inconsistent collection APIs are such an unhinged part of JS. You’re telling me Map doesn’t implement map()? I bet habitually using jQuery feels divine.
Re:jQuery 4.1.0 by skrtskrt on Tuesday November 17, 2026 @10:16PM (#50541427)
I think Datastar probably fits that idea the best in terms of "mild interactive enhancements".

It's sort of the same sort of less-is-more mindset of jQuery but for the modern reactive-component model - intentionally small, allows SSR swapping when possible (like HTMX), and adds the layers of reactivity that can still only be reasonably done with frontend scripting.

Re:jQuery 4.1.0 by benatkin on Wednesday November 18, 2026 @12:48AM (#50542336)
It's effectively closed source. They put essentials in the pro version. Imagine charging for scroll into view.
Re:jQuery 4.1.0 by nchmy on Wednesday November 18, 2026 @05:59AM (#50544716)
This is just willfully false
Re:jQuery 4.1.0 by nchmy on Wednesday November 18, 2026 @06:00AM (#50544726)
Datastar is a thing of beauty and genius