jQuery 4.1.0

(github.com)

151 points | by petecooper 1 hour ago

19 comments

  • CM30 38 minutes 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.

    • chuckadams 11 minutes ago
      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.
    • dalemhurley 29 minutes ago
      There is a heap of indie devs that swear by jQuery and avoid the frameworks like react. Each has their use cases.
      • smt88 14 minutes ago
        What’s a use case for jQuery over vanilla JS?

        When most code is and will be written by AI, why would I sacrifice performance for syntactic sugar?

    • liendolucas 33 minutes ago
      I would probably use Hyperscript for that use case: https://hyperscript.org/
    • proneb1rd 33 minutes ago
      I wonder how many websites on the web still use jquery today
      • ramesh31 29 minutes ago
        >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.

        • wouldbecouldbe 15 minutes ago
          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.
  • hax0ron3 1 hour 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.
    • btown 35 minutes ago
      To that point, there was a conscious choice that the return type of most method invocations (except in specific "read a value" modes) should be a standardized container type.

      That was, and still is, rare! And in a time without type checking and bundling, it was vital. Match your parentheses and quotes, and your jquery code might not find what you want, but it would (likely) not throw exceptions.

      For those unfamiliar, I recommend looking at https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast... and searching for the 201 instances of

          : this
      
      in that file. A remarkably fluent API. We could all be so elegant.
    • paulddraper 2 minutes ago
      This is called a fluent interface. [1] C++ streams are perhaps the most common example of this pattern.

      A TC39 Stage 2 proposal adds this into the language itself with the pipeline `|>` operator. [2]

      [1] https://en.wikipedia.org/wiki/Fluent_interface

      [2] https://github.com/tc39/proposal-pipeline-operator

    • embedding-shape 47 minutes ago
      Are you talking about method chaining, something that comes from JavaScript (technically the DOM I suppose), not jQuery?
      • tyre 43 minutes ago
        Method chaining is library-specific, a function of methods returning `this`/`self`.

        jQuery made the decision to do this, not JavaScript.

      • hax0ron3 4 minutes ago
        Yes, I'm talking about using JS' method chaining. That's what I mean by "going with a language's features".
      • kiliancs 44 minutes ago
        It was not commonplace at the time jQuery was released.
  • gosen 1 hour ago
    I'm actually surprised (in a good way) that it's still maintained, and it still helps half of the internet to function
  • dmix 6 minutes ago
    One of the nice things about LLMs is you can port 10+ year old apps using jQuery to vanilla js pretty easily.
  • coredev_ 1 hour 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.
    • __abc 58 minutes ago
      would you define "complex ui" and what tools you would recommend "today" as an alternative to BS/JQ.
      • Kuyawa 4 minutes ago
        replace jquery with

          $ = (q) => document.querySelector(q)
        
        and

          $$ = (q) => document.querySelectorAll(q)
        
        and you're good to go
      • renegade-otter 37 minutes ago
        Bootstrap has been effectively replaced by Grid/Flex. There is no need for it.

        There is a ton of stuff you can do now with JS directly that JQuery had to compensate for, that's why GitHub spent the effort to move off of JQ years ago.

        CSS and JS has come a long way. I will even venture out to say that UI development does not suck these days, it's even a little enjoyable. You no longer have to spend 3 hours vertically aligning text in a div and then test it in four different browsers.

  • Gualdrapo 1 hour ago
    I wonder if people use jQuery on their new projects. Vanilla JS has come a long way since jQuery was king.
    • elondaits 1 hour ago
      Yes. I did not so long ago. Vanilla JS is fine in term of features, but if you consider jQuery code idiomatic, then it's much more compact and readable for some development patterns.
    • bryanlarsen 1 hour ago
      I'd use jQuery if IE11 support was a requirement. It's been a long time since I've seen that as a requirement, but IE11 was the last Internet Explorer before it got replaced by Edge. I wouldn't be surprised if there were hold-outs out there still using it...
      • ksec 16 minutes ago
        I had to check wiki, IE 11 came out 13 years ago! Internet Explorer 11 support ended on June 15, 2022, and it was permanently disabled on February 14, 2023. ( must have missed the memo or I have forgotten about it )

        W3Counter shows Around 0.07% of market share.

        I wonder why IE11 is still being used or even a requirement? Especially in today's world where security could be a very serious issue.

    • hirvi74 1 hour ago
      I do when absolutely necessary, which is becoming rarer as Vanilla JS improves, like you stated. One of my coworkers is still using it on all new projects though. My employer has avoided the whole SPA scene for better or worse.
    • pjmlp 1 hour ago
      It is still less verbose than the DOM navigation APIs that landed on the browsers.
    • petre 37 minutes ago
      Go ahead, use document.querySelector. Why? Because chaining and a bunch of other stuff and not bothering to check if querySelector actually got anything every single time. Vanilla JS is like bringing a knife to a gun fight.
  • hinkley 1 hour 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.

    • FartinMowler 1 hour ago
      Add your own `.notEmpty()` custom plugin / $.fn method to throw that exception. The rest of the world can stay as-is.
  • squidsoup 1 hour ago
    Out of curiosity, are there still large projects using jQuery? Interesting that it is still maintained.
    • ddalcino 1 hour ago
      Yes, about 63% of all websites: https://w3techs.com/technologies/details/js-jquery

      There's a list of large legacy sites that use jquery behind that link, including:

      * Microsoft.com * Pinterest.com * Adobe.com * Yahoo.com * Wordpress.org * Digicert.com * Samsung.com * Archive.org

      • burningChrome 2 minutes ago
        Seeing Wordpress isn't a shock since JQuery comes bundled directly with it by default. You have to remove it manually if you don't want it. Add in a majority of themes, page builders and themes rely on JQuery for interactivity and DOM manipulation.

        Until people stop making sites with Wordpress, JQuery will continue to live on for a while.

      • buildwrangler 1 hour ago
        Frontend legacy is especially difficult to refactor away from. So many edge case visual regressions and browser compatibility issues make end to end verification really hard. It makes sense jQuery is still so popular in legacy monoliths
    • bluepeter 22 minutes ago
      Surely, I thought, cPanel/WHM no longer use jQuery, right? But it seems they might?? https://api.docs.cpanel.net/guides/guide-to-cpanel-interface...
  • jgalt212 1 hour 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

  • kyleee 1 hour ago
    Do they still build jquery ui? I kind of liked it and maybe will demand my agents start using it again for fun
    • hinkley 1 hour ago
      I was there, Gandalf, I was there the day the strength of Men failed.

      The three biggest problems with JQuery UI:

      1) The quality wasn't anywhere near as good as jquery, so many times I had to correct people whose opinion of jquery encompassed jquery UI

      2) They declared bankruptcy on managing the call tree spaghetti and decided to rewrite the entire thing one component at a time, which meant that simultaneously some things were changing a lot and everything else they refused to entertain bug reports on the parts that were still in the queue.

      3) It took them three times as long to do the work as they expected, and the original ask was already a bit much.

      Angular became a thing before they finished the work.

      • simlevesque 1 hour ago
        > I was there, Gandalf, I was there the day the strength of Men failed.

        Unrelated, but it blew my mind when I learned that Elrond is half-man.

        • booty 1 hour ago
          I either somehow missed that, or forgot. So... today is the day I learned
          • simlevesque 2 minutes ago
            It's never said in the movies, they kind of imply he's like the king of elvens.
        • hinkley 1 hour ago
          I don't know if that was his Hitler dig or just a common trope, of people hating their own ancestry.
          • eszed 36 minutes ago
            I never got the sense that Elrond hated his own ancestry. Certainly not as Tolkien wrote it, though maybe the movies inserted it? He chose to follow the elven path; his brother chose the other. There was sadness between them, but no animosity - same for his daughter.
    • LVB 1 hour ago
      Maintenance mode, but there have been some updates. Announcement: https://blog.jqueryui.com/2021/10/jquery-maintainers-update-...
      • askbjoernhansen 1 hour ago
        That was about "jQuery UI", a separate project.
        • dasil003 52 minutes ago
          Yes. That's what this thread is about.
  • vrubleg 4 minutes ago
    It's a 2026 release, and jQuery still didn't drop 13-years-old IE11 :) https://github.com/jquery/jquery/pull/5077
  • Kuyawa 7 minutes 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

  • maxpert 1 hour ago
    In the age of AIs and Reacts, people would never realize the pleasure and the ease jQuery provided with shitty browsers like IE6!
    • coffeefirst 1 hour ago
      Also just much better JS builtins. document.queryselector and map/filter were many, many years away.
      • W3cUYxYwmXb5c 58 minutes ago
        The selector syntax is still more readable and less verbose in jquery too, IMO
        • masklinn 48 minutes ago
          It's the same syntax tho? jQuery uses CSS selectors (with a few extensions), querySelector uses CSS selectors.
  • frabjoused 1 hour 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.
    • maxpert 1 hour ago
      Both Prototype JS and MooTools!
      • djfobbz 3 minutes ago
        add script.aculo.us to the list as well!
      • janfoeh 4 minutes ago
        [dead]
      • wuhhh 58 minutes ago
        I came here to reminisce about MooTools, the discerning dev’s jQuery ;)
  • bpiroman 10 minutes ago
    I'm tempted to go back to writing jQuery now!
  • sloped 44 minutes 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.

    • tyre 40 minutes ago
      > It was disgusting and it ran in IE7.

      So often was the case that the two ran together, especially with IE6.

  • gsoff 1 hour ago
    have you ever seen an ai suggest jQuery?
    • squidsoup 1 hour ago
      my coworker's claude decided to write a bunch of perl the other day, so who knows?
      • flykespice 1 hour ago
        Ah yes, the ultimate vibecoding experience. Ask the AI to write your code in a write-only language.
        • squidsoup 1 hour ago
          hah no, he was writing python, it decided to write perl on its own.
  • Devasta 1 hour 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.
  • whalesalad 1 hour 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 :)