Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

jQuery 4.1.0 (https://github.com)

377 points by petecooper 3 days ago | 204 comments | View on ycombinator

noduerme 2 days ago |

The composability of jQuery has been an inspiration for the way I design my own frameworks and tools.

One thing I still regularly use jQuery for, though, that's rarely mentioned, is its event model. You can put a listener on any object, not just things in the DOM. Any data object can trigger an event. This is incredibly powerful for isolating logic from DOM elements and events. A frequent use case is for DOM elements to contain a reference to a data object that may be replicated elsewhere on the page. The data object sets up and tears down visual elements, listening for interaction, then dispatches a custom event. Your core logic listens for events on the data object instead of on every individual element that might refer to it. I usually delegate the draw routine for e.g. html snippets of a card or an interactive element to the data object itself in a draw() function that returns a string which incidentally jQuery handles quite nicely inserting into the DOM without needing to explicitly call createElement.

I wrote my own implementation of this a long time ago, but in the end, that feature plus the other ergonomics of jQuery still make it my go-to today over vanilla js. And pretty much everything I write is without any reactive framework (other than my own vanilla component/templating/remoting system), so the overhead is barely noticeable.

hax0ron3 3 days ago |

Although jQuery isn't very relevant these days, I still find its pattern of chaining a sequence of methods on a set chosen by a selector to be a beautiful example of going with a language's features.

CM30 3 days ago |

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.

joel2oliver 3 days ago |

I remember how painful it was to deal with IE/Netscape. Event handlers, etc... jQuery made so many lives easier. It’s quite an achievement, and I can stretch to say that JavaScript development might not be here today without it!

gosen 3 days ago |

I'm actually surprised (in a good way) that it's still maintained, and it still helps half of the internet to function

bastawhiz 2 days ago |

I don't think I'd reach for jQuery ever again, but I'd used it extensively fifteen years ago. I'm glad it's still alive and kicking. When it's already in a project that I'm making changes to, it's a cute way to do stuff easily that would be a pain with vanilla dom.

dday9 2 days ago |

jQuery was a godsend during the 2000s, those were some nasty times for cross-browser capability. Man, do you remember the old way to make asynchronous requests before you could just use the $.ajax method?!

That's why I'm surprised to see still being maintained... ever since Chromium basically won the browser wars and pretty much everything's standardized now, it almost feels like it's lived out its usefulness.

I also want to say I remember it being a bit bloated too. I did work for a client who had several users live in very remote areas where every bit of bandwidth was precious, and I wanted to say that one of the issues was with jQuery. For some reason the "slim" version didn't work for the use case either. This is going off of memory and was probably 15 years ago, so I could be entirely wrong.

There's no denying it's prevalence though. Heck, datatables.net only recently phased out the jQuery dependency in April... of this year!

dmix 3 days ago |

One of the nice things about LLMs is you can port 10+ year old apps using jQuery to vanilla js pretty easily.

Gualdrapo 3 days ago |

I wonder if people use jQuery on their new projects. Vanilla JS has come a long way since jQuery was king.

umvi 3 days ago |

Moved to vanilla JS/TS years ago. In the age of AI CVEs, it's nice to have as few 3rd party dependencies as possible.

thrownaway561 3 days ago |

If it wasn't for jQuery, I would bet 90% of the web development wouldn't have progressed. There were SOOO many inconstancies between browsers back then. jQuery made javascript fun and easy. There was a time where EVERYTHING was a jQuery plugin.

jgalt212 3 days ago |

I was about to say, but datatables.net! But version 3, as of July 2026, has dropped the jQuery dependency.

https://datatables.net/blog/2026/datatables-3

hinkley 3 days ago |

I don't want jQuery back, but I want something that works like it except in the opposite way on corner cases.

Now that ES and CSS5 are everywhere, the biggest feature of jQuery is list comprehensions on components. Data is also still good IMO but mostly the comprehensions.

jQuery decided that calling a function on an empty list should be a no-op, but my experience using it for a very interactive application was that nearly every time we wanted something to definitely happen or it was a bug, and the handful of times where an empty list was expected were easy to anticipate.

Because the general problem was that making a selector that continued to work correctly as features were added was a black art. Two of us wrote selectors that almost always worked, the rest of the team wrote ones that almost always broke and only very slowly onboarded our advice (also all of the stuff they already wrote was a ticking time bomb).

New features and especially tweaking the DOM tree to stay compatible with old corporate browsers would break existing functionality about a quarter of the time someone had to change the DOM structure to close a ticket and it was infuriating.

So what I want is that if .hide() is a no-op, throw an exception. And if I'm implementing the 'select all/unselect all' feature I know that the list might be empty, I can add a flag or wrap a conditional around it so I ignore the error.

Because those functions work on a very tight chunk of DOM that changes structure much much slower than the overall document structure, and also that code is quite close to the point of change if someone does change it, so has better chances of being remembered than something in the header.

grugdev42 2 days ago |

Thank you jQuery! I still use you regularly.

faramarz 2 days ago |

Man, just seeing the name jQuery took me back to the days I was using MooTools for its fantastic animation engine and was always annoyed how simpler jQuery was to implement while mootools was superior for front end design. Thanks for the memory lane.

kyleee 3 days ago |

Do they still build jquery ui? I kind of liked it and maybe will demand my agents start using it again for fun

coredev_ 3 days ago |

JQuery is not a good way to compose and handle complex ui:s. There are so much better ways today. I have fine memories of bootstrap and jQuery - just don't use them today if you are composing a somewhat complex ui.

Velocifyer 2 days ago |

I still wish jQuery kept at least 2 years of browser support, rather than last 3 versions of iOS, or 2 of Firefox. Many people are stuck on old iOS.

jszymborski 2 days ago |

I'm still refreshing my yayQuery RSS feed everyday in hopes of a surprise

maxpert 3 days ago |

In the age of AIs and Reacts, people would never realize the pleasure and the ease jQuery provided with shitty browsers like IE6!

frabjoused 3 days ago |

Since it's easy now to maintain and this is still happening, why not bring back MooTools? I'd love to hear that AI chose MooTools as default and it's running the entire Internet.

vrubleg 3 days ago |

It's a 2026 release, and jQuery still didn't drop 13-years-old IE11 :) https://github.com/jquery/jquery/pull/5077

tkslucas 2 days ago |

Legendary drop, so many great memories

Prathamdeshmukh 2 days ago |

Used it extensively 15 years ago, at the start of my career.

Did not know this library is still being maintained

sloped 3 days ago |

Back around the time React was maybe in it's pre 1.0 stage, I basically built a "React" system with jQuery as it's backbone. Div elements that declared what they were then were initialized at "Boot" to give them interactivity. It was disgusting and it ran in IE7.

jQuery really changed the game by letting an average developer actually use Javascript to enhance a web page. Granted I want to go back to the days when no one used Javascript and the Internet was a giant mess of terrible 8bit graphics and anonymous friends, but thank you jQuery for everything you did. It is not your fault humans are terrible.

pluc 2 days ago |

The little library that took on $.

bpiroman 3 days ago |

I'm tempted to go back to writing jQuery now!

gsoff 3 days ago |

have you ever seen an ai suggest jQuery?

blinkbat 3 days ago |

LFG

squidsoup 3 days ago |

Out of curiosity, are there still large projects using jQuery? Interesting that it is still maintained.

Devasta 3 days ago |

If it weren't for the chrome team fucking up autocomplete in their browser I'd probably still be using jQuery today. Even now I look at sites like https://youmightnotneedjquery.com/ and I see much nicer code to work with than the JS suggested.

zhisme 2 days ago |

long live the king!

gounscrambler 2 days ago |

[flagged]

yoy0721 2 days ago |

[flagged]

Agataproximadev 2 days ago |

[flagged]

whalesalad 3 days ago |

    FAA ground stop: initiated
    Microsoft 365: down
    United Airlines: down
    Github actions: down
    Apple: down
    Nvidia CEO: owned
    Clandestine NSA network: down

    jQuery: 4.1.0 released :)

Kuyawa 3 days ago |

Some people hasn't awaken to the new AI dawn

You just don't need this. No jquery, no react, no tailwind, no fowntawesome, no external libs, no malware attack vectors, no waiting for a new update that never comes. It is all poison, just don't drink it and you'll be fine