jQuery 4.1.0

(github.com)

276 points by petecooper8 hours ago

32 comments

  • noduerme1 hour ago
    The composability of jQuery has been an inspiration for the way I design my own frameworks and tools.<p>One thing I still regularly use jQuery for, though, that&#x27;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.<p>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&#x2F;templating&#x2F;remoting system), so the overhead is barely noticeable.
    • devsda31 minutes ago
      &gt; The composability of jQuery has been an inspiration for the way I design my own frameworks and tools<p>Not just as a framework but its documentation is also probably an inspiration for later libs. It was the first site for me where you could see the code and result together on the same page at the same place. And the discoverability of widgets was also great and exciting in a way.<p>Just open the firebug console, and try the examples for selectors, callbacks etc.
  • hax0ron38 hours ago
    Although jQuery isn&#x27;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&#x27;s features.
    • btown7 hours ago
      To that point, there was a conscious choice that the return type of most method invocations (except in specific &quot;read a value&quot; modes) should be a standardized container type.<p>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.<p>For those unfamiliar, I recommend looking at <a href="https:&#x2F;&#x2F;github.com&#x2F;DefinitelyTyped&#x2F;DefinitelyTyped&#x2F;blob&#x2F;master&#x2F;types&#x2F;jquery&#x2F;JQuery.d.ts" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;DefinitelyTyped&#x2F;DefinitelyTyped&#x2F;blob&#x2F;mast...</a> and searching for the 201 instances of<p><pre><code> : this </code></pre> in that file. A remarkably fluent API. We could all be so elegant.
      • submain2 hours ago
        I&#x27;m just sitting and waiting until someone mentions &quot;monads&quot;...
        • hax0ron32 hours ago
          I considered doing it in my top-level comment but I decided not to, since I don&#x27;t actually know enough about monads to be sure that I know what I&#x27;m talking about, lol.
    • franciscop50 minutes ago
      This is one of the first things I learned in programming. A friend back in University showed me a bit of his code (neither of us were in CS), and I was like why are you returning `this`? Then he showed me this chaining. I only found it a &quot;cool trick&quot; at the moment, who&#x27;d told me that I&#x27;d end up loving it the more I learned programming. I&#x27;ve made two of my main libraries, `umbrellajs` and a plumbing one called `swear` (chaining but for promises, some chaining syntax sugar on top of promises basically), based on this. I stopped doing it too much in recent years, but still it&#x27;s amazing.
    • thallavajhula4 hours ago
      If you pick a pure OOP language like Ruby, you&#x27;ll have the same experience. You can pick a literal and call a method on it and chain the method calls. It&#x27;s lovely.
    • hk13374 hours ago
      Mootools was way better but never got the attention jquery got.
    • pwdisswordfishq5 hours ago
      Meh, other than being easier to type, it&#x27;s nothing to sing praises about. It is harder to reason about, both for the interpreter (which does not immediately know that the return value is the same object as the receiver and therefore cannot optimize based on that assumption) and for the programmer (which has to look up documentation to learn the same).<p>I hope <a href="https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-pipeline-operator" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-pipeline-operator</a> and perhaps also <a href="https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-do-expressions" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-do-expressions</a> will put it to rest.
    • lofaszvanitt2 hours ago
      Why? It&#x27;s still the sanest choice for a site that doesnt need a bloated js &quot;framework&quot;.
      • skrtskrt1 hour ago
        Things like Alpine, HTMX, and Datastar seem to be more in favor these days.<p>They have the small surface area of jQuery, but still aim for component-based reactivity and SSR-when-possible which just aligns more with the mental model and development preferences that have developed from the whole world of React&#x2F;Next and similar.
    • paulddraper7 hours ago
      This is called a fluent interface. [1] C++ streams are perhaps the most common example of this pattern.<p>A TC39 Stage 2 proposal adds this into the language itself with the pipeline `|&gt;` operator. [2]<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fluent_interface" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fluent_interface</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-pipeline-operator" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposal-pipeline-operator</a>
      • anamexis6 hours ago
        Fluent interface is method chaining, and it&#x27;s already obviously in JS. The proposed pipeline operator is neither method chaining nor fluent interface.
        • abanana6 hours ago
          As I understand it, it&#x27;s a different method to create something that matches the whole idea of a fluent interface, without having to build every method to support chaining, isn&#x27;t it? And in a way that works for all language features rather than just your custom methods?<p>Maybe not precisely the same from a technical point of view but is it just pendantry to argue against someone referring to it as a fluent interface? Happy to learn and to be corrected if required.
          • everforward3 hours ago
            It can, but the typical usage I’m used to is far less structured and need not involve the value having the same type at every point. Eg something like<p>|&gt; docker.listContainers() filter(x =&gt; x.name == “something”) first getNetwork getIpAddress toString ping<p>(ignore that some of these should be chained and some should be arguments, I haven’t read the proposal fully)<p>They’re doubly nice in Clojure because of the lazy evaluation. You can map a pipeline over a list and it will evaluate one at a time rather than pre-evaluating and allocating memory for the whole thing.
          • anamexis5 hours ago
            What is the &quot;whole idea&quot; of a fluent interface if not specifically method chaining?
        • paulddraper14 minutes ago
          The pipeline operator makes it possible to chain any functions.<p>Which true is not per se fluent interfaces, but it reads similarly.<p>And &quot;fluent&quot; -- as the name suggests -- has a lot to do with how it reads, left-to-right with no intermediate variables.
    • leptons5 hours ago
      Not very relevant? It&#x27;s still powering 64% of the websites in the world in 2026. React is only powering about 6% of the websites in the world today.<p>Jquery is only not relevant if you&#x27;re living in a tech bubble that demands that &quot;new, shiny&quot; is the only thing that could possibly be relevant.
      • addedlovely2 hours ago
        Where are those numbers from, I make it about 53% and 10% for react. <a href="https:&#x2F;&#x2F;theweb.report&#x2F;#front-end" rel="nofollow">https:&#x2F;&#x2F;theweb.report&#x2F;#front-end</a><p>But still everywhere!
      • hax0ron33 hours ago
        True. I am living in such a tech bubble. It has been a very long time since I&#x27;ve worked with jQuery. Which is separate from my personal feelings about jQuery, since I&#x27;m a jQuery fan - although these days I wouldn&#x27;t use it, since changes in Web APIs, changes partly inspired by jQuery, have made it possible to write jQuery-esque code without actually loading jQuery.
      • greenchair4 hours ago
        amen
    • embedding-shape7 hours ago
      Are you talking about method chaining, something that comes from JavaScript (technically the DOM I suppose), not jQuery?
      • tyre7 hours ago
        Method chaining is library-specific, a function of methods returning `this`&#x2F;`self`.<p>jQuery made the decision to do this, not JavaScript.
      • hax0ron37 hours ago
        Yes, I&#x27;m talking about using JS&#x27; method chaining. That&#x27;s what I mean by &quot;going with a language&#x27;s features&quot;.
      • kiliancs7 hours ago
        It was not commonplace at the time jQuery was released.
  • CM307 hours ago
    I&#x27;m a tad surprised jQuery still exists, though it&#x27;s kinda neat it does. Always interesting to see historical projects with less and less modern day relevance get continued like this.<p>And while most of the use cases for jQuery have long since died out with things like classList, querySelector, etc, I do feel there&#x27;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.
    • chuckadams7 hours ago
      jQuery collections are much much nicer than the incredibly anemic NodeList you get from querySelector, which doesn&#x27;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&#x27;t personally use jQuery very often since I prefer declarative components, but if I&#x27;m whipping up something imperative like a user script, it&#x27;s hard to beat jQuery&#x27;s &quot;lenses for the DOM&quot;, as one Haskell programmer put it.
      • abanana6 hours ago
        <i>&gt; set states on every element matching a jQuery selector</i><p>Very much so. jQuery had 2 major selling points - (1) browser polyfills and (2) conciseness, as per their slogan, &quot;Write less, do more&quot;. 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.
        • nixpulvis6 hours ago
          Love me some jQuery. I honestly think the web would be in a better place if we hadn&#x27;t stopped using HS for things like little jQuery scripts and kept the servers doing the controllers and handling the models.
      • wvbdmp6 hours ago
        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.
      • recursive6 hours ago
        That&#x27;s a lot of stuff just for [...nodeList].
        • chuckadams6 hours ago
          jQuery predates that syntax, but have fun chaining that even now.
          • recursive5 hours ago
            jQuery had a lot of reasons for existing. And now it has less than it used to. I believe that was the point.<p>You&#x27;d probably usually chain that inside the callback. Instead of addClass(&#x27;foo&#x27;).hide(), you&#x27;d do el.classList.add(&#x27;foo&#x27;); el.hidden = true; or something. It&#x27;s not 1:1, but also it&#x27;s not really that big a deal.
    • dalemhurley7 hours ago
      There is a heap of indie devs that swear by jQuery and avoid the frameworks like react. Each has their use cases.
      • smt887 hours ago
        What’s a use case for jQuery over vanilla JS?<p>When most code is and will be written by AI, why would I sacrifice performance for syntactic sugar?
        • xp846 hours ago
          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.
          • saidinesh56 hours ago
            Not sure about &quot;modern hardware&quot; but I think the comparison is between jQuery vs. Vanilla JS on &quot;modern browsers&quot;.<p>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.<p>&gt; The latest version of jQuery (v4.0.0) is 76.8 kB minified and 27.0 kB minified + gzipped.
            • treve2 hours ago
              Typically when someone switches frameworks, libraries, languages they get a performance boost even if the source and target is comparable.
          • smt885 hours ago
            jQuery feels much snappier than React, and vanilla JS feels much snappier than jQuery. There is genuinely a noticeable different even in fairly simple UIs.
            • proxyscore4 hours ago
              Yes and reading resigs book on how he made jquery, well I can&#x27;t say anything but the guy was a genius way ahead of it&#x27;s time.
        • nilamo6 hours ago
          Vanilla JS only works with a recent browser. JQuery works with old garbage people never updated.
          • smt885 hours ago
            This is absolutely not a reason to use jQuery. This reason is 15+ years old.<p>First, modern vanilla JS APIs have been available for more than ten years. A browser without them is absolutely ancient.<p>And for the browsers that are truly that old, you can use nearly-weightless polyfills instead of jQuery.
          • saidinesh56 hours ago
            But what old garbage browsers are still in use?
            • TonyTrapp6 hours ago
              More than you&#x27;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.
              • smt885 hours ago
                Why use jQuery instead of situational, atomic polyfills that just provide the functionality you’re actually using?
                • skydhash5 hours ago
                  Single download is better than multiple small downloads.
                  • Timon33 hours ago
                    Is &quot;modern&quot; jQuery tree-shakeable? If not, individual polyfills will be way smaller.
                  • majewsky5 hours ago
                    Ain&#x27;t no law saying that you can&#x27;t bundle multiple polyfills.
                    • skydhash5 hours ago
                      You can. And that&#x27;s how you get jQuery
            • starkparker6 hours ago
              jQuery 3.8.0 was also part of this release (if &quot;as a send-off, not a comeback&quot; per the announcement[1]), and it supports IE 9-10, legacy Edge, iOS 7+, and Android 4.0+.<p>We just had a T1 line blow up the entire US air control infrastructure, so I&#x27;ll happily assume people are still using old garbage in critical workflows.<p>1: <a href="https:&#x2F;&#x2F;blog.jquery.com&#x2F;2026&#x2F;11&#x2F;17&#x2F;jquery-4-1-0-and-3-8-0-released-passing-the-torch&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.jquery.com&#x2F;2026&#x2F;11&#x2F;17&#x2F;jquery-4-1-0-and-3-8-0-re...</a>
        • reassess_blind6 hours ago
          Valid questions. In jQuery&#x27;s case it&#x27;s still so widely used by older codebases that it makes sense to improve and keep maintained. I think it&#x27;s important to have alternatives in any case. Some people still prefer to write code by hand, and some people prefer jQuery.
        • mathgeek6 hours ago
          I wouldn&#x27;t say there are _many_ use cases, but &quot;LLM is writing code in a legacy codebase without heavy refactors&quot; fits your question.
        • SoftTalker6 hours ago
          Same reason we&#x27;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&#x27;t matter.
          • smt885 hours ago
            Why would AI have a harder time with vanilla JS?
    • skrtskrt1 hour ago
      I think Datastar probably fits that idea the best in terms of &quot;mild interactive enhancements&quot;.<p>It&#x27;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.
    • liendolucas7 hours ago
      I would probably use Hyperscript for that use case: <a href="https:&#x2F;&#x2F;hyperscript.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hyperscript.org&#x2F;</a>
      • Exoristos5 hours ago
        Good luck getting your boss to commit that $40 million project to a meme language.
    • proneb1rd7 hours ago
      I wonder how many websites on the web still use jquery today
      • kevin_thibedeau6 hours ago
        StackOverflow still does. Delivered via Google for no good reason other than to give them tracking data on SO users.
      • cantalopes5 hours ago
        A lot actually
      • sigzero6 hours ago
        If you believe a google query:<p>Approximately 64% of all websites—or roughly 67 million live domains—currently use jQuery.
      • ramesh317 hours ago
        &gt;I wonder how many websites on the web still use jquery today<p>Probably more than use React, by total domains alone. It&#x27;s a bit like WordPress; so ubiquitous you forget it&#x27;s even there, and with a long tail that will outlive many people reading this.
        • wouldbecouldbe7 hours 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.
        • xp846 hours ago
          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.
          • noduerme6 hours ago
            fetch only became available in 2015 and it was awhile before it was commonly supported. At the time, jQuery&#x27;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.
            • xp8435 minutes ago
              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.
  • joel2oliver6 hours ago
    I remember how painful it was to deal with IE&#x2F;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!
    • alehlopeh6 hours ago
      Netscape was not the same era as jQuery.
      • xp846 hours ago
        Sure, Netscape was dead (besides the name) before then. But in 2006 we were dealing with Gecko (mainly in the form of Firefox), IE6, IE7 which was brand new and most notable for being different than both IE6 and standards-compliant browsers, and Safari.
      • sigzero6 hours ago
        I don&#x27;t think he was equating the two. Just saying how bad it was to deal with them. I could be wrong.
  • gosen8 hours ago
    I&#x27;m actually surprised (in a good way) that it&#x27;s still maintained, and it still helps half of the internet to function
  • bastawhiz4 hours ago
    I don&#x27;t think I&#x27;d reach for jQuery ever again, but I&#x27;d used it extensively fifteen years ago. I&#x27;m glad it&#x27;s still alive and kicking. When it&#x27;s already in a project that I&#x27;m making changes to, it&#x27;s a cute way to do stuff easily that would be a pain with vanilla dom.
  • dday95 hours 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?!<p>That&#x27;s why I&#x27;m surprised to see still being maintained... ever since Chromium basically won the browser wars and pretty much everything&#x27;s standardized now, it almost feels like it&#x27;s lived out its usefulness.<p>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 &quot;slim&quot; version didn&#x27;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.<p>There&#x27;s no denying it&#x27;s prevalence though. Heck, datatables.net only recently phased out the jQuery dependency in April... of this year!
    • dwoldrich4 hours ago
      Those original AJAX API&#x27;s were pretty slick, but not well understood at the time. Surprisingly they could stream characters! The response is partially available each time onprogress fires:<p><pre><code> const xhr = new XMLHttpRequest(); let lastLength = 0; xhr.addEventListener(&quot;progress&quot;, () =&gt; { const chunk = xhr.responseText.substring(lastLength); lastLength = xhr.responseText.length; console.log(&quot;New data:&quot;, chunk); }); xhr.open(&quot;GET&quot;, &quot;&#x2F;stream&quot;); xhr.send(); </code></pre> -------------------<p>The modern fetch API is better though because it&#x27;s a Promises API and it can stream as raw bytes, not characters:<p><pre><code> const response = await fetch(&quot;&#x2F;stream&quot;); const reader = response.body.getReader(); while (true) { const { value, done } = await reader.read(); if (done) { console.log(&quot;Finished&quot;); break; } console.log(&quot;Received&quot;, value.length, &quot;bytes&quot;); }</code></pre>
      • bastawhiz3 hours ago
        It&#x27;s actually a little easier these days:<p><pre><code> const response = await fetch(&quot;&#x2F;stream&quot;); for await (const value of response.body) { console.log(&quot;Received&quot;, value.length, &quot;bytes&quot;); } console.log(&quot;Finished&quot;)</code></pre>
    • scottchiefbaker5 hours ago
      [dead]
  • dmix7 hours ago
    One of the nice things about LLMs is you can port 10+ year old apps using jQuery to vanilla js pretty easily.
  • Gualdrapo8 hours ago
    I wonder if people use jQuery on their new projects. Vanilla JS has come a long way since jQuery was king.
    • elondaits8 hours 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&#x27;s much more compact and readable for some development patterns.
    • DamnInteresting6 hours ago
      &gt; <i>I wonder if people use jQuery on their new projects.</i><p>I do frequently, partially because I tend to branch new projects from old ones, and the old ones often used jQuery. Updating everything to vanilla would be a lot of effort for little gain.<p>I wonder how it feels for the original jQuery developers. They solved some big problems, then their ideas were just copied into Javascript itself, and their pioneering library became decried as old and irrelevant--even though it works just fine, and still solves some niche problems.
      • lofaszvanitt2 hours ago
        John Resig et al scattered some corn and they ate them like chickens. They stole the ideas and couldn&#x27;t copy the features adequately. They had one job. They failed. They should&#x27;ve brought a black suitcase full of money to them and ask nicely to implement the whole thing to replace the abhorrent JS browser side implementation.
    • bryanlarsen8 hours ago
      I&#x27;d use jQuery if IE11 support was a requirement. It&#x27;s been a long time since I&#x27;ve seen that as a requirement, but IE11 was the last Internet Explorer before it got replaced by Edge. I wouldn&#x27;t be surprised if there were hold-outs out there still using it...
      • ksec7 hours 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 )<p>W3Counter shows Around 0.07% of market share.<p>I wonder why IE11 is still being used or even a requirement? Especially in today&#x27;s world where security could be a very serious issue.
        • OuterVale6 hours ago
          IE 11 isn&#x27;t fully out of support for a few more years yet. There are so many enterprises using it with so many custom tools built just for the browser. Most is tight lipped under NDAs but some of the details and remaining usage figures are staggering.
        • abanana5 hours ago
          <i>&gt; permanently disabled</i><p>Only on Windows 10 and 11. It still runs as it always did on previous Windowses.
    • marticode3 hours ago
      I do because every time I try to use vanilla JS, I end up reinventing the $ function and adding a few basic utilities, at which point it feels like I might just use jQuery and make my code more compact and legible.<p>That being said it&#x27;s no longer that useful for dealing with browser incompatibilities or for remote calls. I end up using a stripped version or something like <a href="https:&#x2F;&#x2F;github.com&#x2F;fabiospampinato&#x2F;cash" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fabiospampinato&#x2F;cash</a>
    • pjmlp8 hours ago
      It is still less verbose than the DOM navigation APIs that landed on the browsers.
    • hirvi748 hours 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.
    • petre7 hours 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.
      • xp846 hours ago
        There&#x27;s a purpose for everything. Jquery is quite nice to write and works great. For a whole site, I&#x27;d these days be interested in building with HTMX, but JQ is fine and has the advantage that there are millions of people out there who know it well.<p>What vanilla is obviously unbeatable for is, you&#x27;re writing a snippet of JS that you can hand anyone[1] to run with no dependency requirements. Some codebases may be explicitly incompatible with JQ, so knowing how to do all the JQ basics &quot;vanilla&quot; is an important skill so you don&#x27;t have to bring in a &quot;big&quot; (relatively, I mean) library to support a 7-line function.<p>[1] for example, an embed code, an analytics tag, or a script to customize the markup on a page.
  • hinkley8 hours ago
    I don&#x27;t want jQuery back, but I want something that works like it except in the opposite way on corner cases.<p>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.<p>jQuery decided that calling a function on an empty list should be a no-op, but my experience using it for a <i>very</i> 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.<p>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).<p>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.<p>So what I want is that if .hide() is a no-op, throw an exception. And if I&#x27;m implementing the &#x27;select all&#x2F;unselect all&#x27; 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.<p>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 <i>does</i> change it, so has better chances of being remembered than something in the header.
    • FartinMowler8 hours ago
      Add your own `.notEmpty()` custom plugin &#x2F; $.fn method to throw that exception. The rest of the world can stay as-is.
  • umvi6 hours ago
    Moved to vanilla JS&#x2F;TS years ago. In the age of AI CVEs, it&#x27;s nice to have as few 3rd party dependencies as possible.
  • Velocifyer4 hours 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.
    • bastawhiz3 hours ago
      Does it actually not work on browsers from two years ago?
  • Prathamdeshmukh3 hours ago
    Used it extensively 15 years ago, at the start of my career.<p>Did not know this library is still being maintained
  • coredev_8 hours 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&#x27;t use them today if you are composing a somewhat complex ui.
    • __abc8 hours ago
      would you define &quot;complex ui&quot; and what tools you would recommend &quot;today&quot; as an alternative to BS&#x2F;JQ.
      • renegade-otter7 hours ago
        Bootstrap has been effectively replaced by Grid&#x2F;Flex. There is no need for it.<p>There is a ton of stuff you can do now with JS directly that JQuery had to compensate for, that&#x27;s why GitHub spent the effort to move off of JQ years ago.<p>CSS and JS has come a long way. I will even venture out to say that UI development does not suck these days, it&#x27;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.
      • Kuyawa7 hours ago
        replace jquery with<p><pre><code> $ = (q) =&gt; document.querySelector(q) </code></pre> and<p><pre><code> $$ = (q) =&gt; document.querySelectorAll(q) </code></pre> and you&#x27;re good to go
        • troupo6 hours ago
          No, you&#x27;re not.<p>jQuery returned useful collections. DOM methods return an anemic NodeList which doesn&#x27;t even implement Array interface.
          • hajile3 hours ago
            NodeList has .values() that returns an iterator.<p><pre><code> var $$ = q =&gt; document.querySelectorall(q).values() </code></pre> Then you have access to a bunch of iterator methods<p><a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Reference&#x2F;Global_Objects&#x2F;Iterator" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Refe...</a>
          • kuschku6 hours ago
            That&#x27;s why I do<p><pre><code> $ = (selector) =&gt; Array.from(document.querySelectorAll(selector)) </code></pre> Still not as good as the original, but somewhat usable at least :&#x2F;
            • edflsafoiewq6 hours ago
              There are small libraries like umbrellajs that just provide a jquery-like DOM interface if that&#x27;s all you want.
          • Kuyawa6 hours ago
            <p><pre><code> $(&#x27;body&#x27;).childNodes.forEach(console.log) </code></pre> I see a beautiful collection there
            • troupo6 hours ago
              NodeList exposes exactly 5 methods: item, entries, forEach, keys, and values.<p>Very beautiful.<p>BTW, browsers didn&#x27;t even add forEach to it until several years after they added document.querySelectorAll lol<p><i>Edit</i>. <a href="https:&#x2F;&#x2F;caniuse.com&#x2F;?search=nodelist" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;?search=nodelist</a><p>NodeList appeared in 2006(Firefox) - 2008 (Safari) - 2010 (Chrome)<p>forEach on it appeared in... <i>2016</i>.
  • tkslucas5 hours ago
    Legendary drop, so many great memories
  • thrownaway5616 hours ago
    If it wasn&#x27;t for jQuery, I would bet 90% of the web development wouldn&#x27;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.
  • maxpert8 hours ago
    In the age of AIs and Reacts, people would never realize the pleasure and the ease jQuery provided with shitty browsers like IE6!
    • coffeefirst8 hours ago
      Also just much better JS builtins. document.queryselector and map&#x2F;filter were many, many years away.
      • W3cUYxYwmXb5c8 hours ago
        The selector syntax is still more readable and less verbose in jquery too, IMO
        • masklinn7 hours ago
          It&#x27;s the same syntax tho? jQuery uses CSS selectors (with a few extensions), querySelector uses CSS selectors.
  • frabjoused8 hours ago
    Since it&#x27;s easy now to maintain and this is still happening, why not bring back MooTools? I&#x27;d love to hear that AI chose MooTools as default and it&#x27;s running the entire Internet.
    • maxpert8 hours ago
      Both Prototype JS and MooTools!
      • djfobbz7 hours ago
        add script.aculo.us to the list as well!
      • janfoeh7 hours ago
        [dead]
      • wuhhh8 hours ago
        I came here to reminisce about MooTools, the discerning dev’s jQuery ;)
  • vrubleg7 hours ago
    It&#x27;s a 2026 release, and jQuery still didn&#x27;t drop 13-years-old IE11 :) <a href="https:&#x2F;&#x2F;github.com&#x2F;jquery&#x2F;jquery&#x2F;pull&#x2F;5077" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jquery&#x2F;jquery&#x2F;pull&#x2F;5077</a>
  • pluc5 hours ago
    The little library that took on $.
  • sloped7 hours ago
    Back around the time React was maybe in it&#x27;s pre 1.0 stage, I basically built a &quot;React&quot; system with jQuery as it&#x27;s backbone. Div elements that declared what they were then were initialized at &quot;Boot&quot; to give them interactivity. It was disgusting and it ran in IE7.<p>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.
    • tyre7 hours ago
      &gt; It was disgusting and it ran in IE7.<p>So often was the case that the two ran together, <i>especially</i> with IE6.
  • bpiroman7 hours ago
    I&#x27;m tempted to go back to writing jQuery now!
  • gsoff8 hours ago
    have you ever seen an ai suggest jQuery?
    • squidsoup8 hours ago
      my coworker&#x27;s claude decided to write a bunch of perl the other day, so who knows?
      • flykespice8 hours ago
        Ah yes, the ultimate vibecoding experience. Ask the AI to write your code in a write-only language.
        • squidsoup8 hours ago
          hah no, he was writing python, it decided to write perl on its own.
  • blinkbat6 hours ago
    LFG
  • jgalt2128 hours ago
    I was about to say, but datatables.net! But version 3, as of July 2026, has dropped the jQuery dependency.<p><a href="https:&#x2F;&#x2F;datatables.net&#x2F;blog&#x2F;2026&#x2F;datatables-3" rel="nofollow">https:&#x2F;&#x2F;datatables.net&#x2F;blog&#x2F;2026&#x2F;datatables-3</a>
  • squidsoup8 hours ago
    Out of curiosity, are there still large projects using jQuery? Interesting that it is still maintained.
    • ddalcino8 hours ago
      Yes, about 63% of all websites: <a href="https:&#x2F;&#x2F;w3techs.com&#x2F;technologies&#x2F;details&#x2F;js-jquery" rel="nofollow">https:&#x2F;&#x2F;w3techs.com&#x2F;technologies&#x2F;details&#x2F;js-jquery</a><p>There&#x27;s a list of large legacy sites that use jquery behind that link, including:<p>* Microsoft.com * Pinterest.com * Adobe.com * Yahoo.com * Wordpress.org * Digicert.com * Samsung.com * Archive.org
      • buildwrangler8 hours 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
      • burningChrome7 hours ago
        Seeing Wordpress isn&#x27;t a shock since JQuery comes bundled directly with it by default. You have to remove it manually if you don&#x27;t want it. Add in a majority of themes, page builders and themes rely on JQuery for interactivity and DOM manipulation.<p>Until people stop making sites with Wordpress, JQuery will continue to live on for a while.
    • bluepeter7 hours ago
      Surely, I thought, cPanel&#x2F;WHM no longer use jQuery, right? But it seems they might?? <a href="https:&#x2F;&#x2F;api.docs.cpanel.net&#x2F;guides&#x2F;guide-to-cpanel-interface-customization-and-branding&#x2F;guide-to-cpanel-interface-customization-jquery" rel="nofollow">https:&#x2F;&#x2F;api.docs.cpanel.net&#x2F;guides&#x2F;guide-to-cpanel-interface...</a>
  • kyleee8 hours ago
    Do they still build jquery ui? I kind of liked it and maybe will demand my agents start using it again for fun
    • hinkley8 hours ago
      I was there, Gandalf, I was there the day the strength of Men failed.<p>The three biggest problems with JQuery UI:<p>1) The quality wasn&#x27;t anywhere near as good as jquery, so many times I had to correct people whose opinion of jquery encompassed jquery UI<p>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.<p>3) It took them three times as long to do the work as they expected, and the original ask was already a bit much.<p>Angular became a thing before they finished the work.
      • simlevesque8 hours ago
        &gt; I was there, Gandalf, I was there the day the strength of Men failed.<p>Unrelated, but it blew my mind when I learned that Elrond is half-man.
        • booty8 hours ago
          I either somehow missed that, or forgot. So... today is the day <i>I</i> learned
          • simlevesque7 hours ago
            It&#x27;s never said in the movies, they kind of imply he&#x27;s like the king of elvens.
        • hinkley8 hours ago
          I don&#x27;t know if that was his Hitler dig or just a common trope, of people hating their own ancestry.
          • eszed7 hours 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.
          • sigzero6 hours ago
            Elrond never hated his ancestry.
            • hinkley4 hours ago
              He seems to be awfully done with humans. Not round them up done, but stay the fuck over there and leave us alone done for sure. Oh you&#x27;re all dying? That sucks for you.
    • LVB8 hours ago
      Maintenance mode, but there have been some updates. Announcement: <a href="https:&#x2F;&#x2F;blog.jqueryui.com&#x2F;2021&#x2F;10&#x2F;jquery-maintainers-update-and-transition-jquery-ui-as-part-of-overall-modernization-efforts&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.jqueryui.com&#x2F;2021&#x2F;10&#x2F;jquery-maintainers-update-...</a>
      • askbjoernhansen8 hours ago
        That was about &quot;jQuery UI&quot;, a separate project.
        • dasil0037 hours ago
          Yes. That&#x27;s what this thread is about.
          • gnabgib6 hours ago
            This thread is about jQuery 4.1. jQuery UI is only up to 1.14
            • dasil0034 hours ago
              The <i>post</i> is about jQuery 4.1. The <i>thread</i> is about jQuery UI.
        • LVB5 hours ago
          kylee asked, &quot;Do they still build jquery ui&quot;
  • Devasta8 hours ago
    If it weren&#x27;t for the chrome team fucking up autocomplete in their browser I&#x27;d probably still be using jQuery today. Even now I look at sites like <a href="https:&#x2F;&#x2F;youmightnotneedjquery.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;youmightnotneedjquery.com&#x2F;</a> and I see much nicer code to work with than the JS suggested.
  • yoy072149 minutes ago
    [flagged]
  • Agataproximadev5 hours ago
    [flagged]
  • Kuyawa7 hours ago
    Some people hasn&#x27;t awaken to the new AI dawn<p>You just don&#x27;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&#x27;t drink it and you&#x27;ll be fine
    • rico7355 hours ago
      Sounds maintainable.
    • darig6 hours ago
      [dead]
  • whalesalad8 hours ago
    <p><pre><code> 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 :)</code></pre>