back
111 comments
Sure jQuery as a selector engine has more or less been replaced, css has advanced etc.

But the jQuery UI widgets are battle hardened and easier to deploy, case in point , date pickers, calendaries and well, slideshows.

And you can kind of replicate some of reacts behaviour regarding state management.

If all you need to do is keep state on a handful of elements, there is no need to develop in react.

Infact, just like the jquery heydays, react is often overused, for the most simply web forms, menus, footers.

And, no need for router and other state management tools.

Might be a bit unpopular, but when its all said and done, its compiled to js either way, I kinda like jquery or vanilla js for the front end and node/express for the back end.

The amount of react devs which struggle with css and vanilla js appears to be higher than during the jquery days.

I rather like jQuery as it just patches over so much of the DOM API, which offends my sensibilities of what a "good API" should look like. I don't think the jQuery API is perfect, but it's a lot better.

But I never really liked jQuery UI, either as a user or developer. As a user, the whole "desktop semantics in your browser" is one of those things that was worth trying 15 years ago, but it mostly never really worked all that well, and pretty much everyone has dropped it.

As a developer I feel jQuery UI is too complex for what it does, partly because of the above.

At any rate, jQuery and jQuery UI are two entirely different projects.

My job has a lot of little customers with little projects and some older ones were made with jquery and we keep on keeping on. Why not? Also if we have to make similar projects we branch from older ones. So some of our current development uses jquery which raises some eyebrows but nothing like using 95% battle hardened code than starting fresh because…
Why not components from a React library like Material UI?

jQuery UI is "in a maintenance state" and "older long-standing bugs may not get fixed" I'm afraid

https://blog.jqueryui.com/2022/07/jquery-ui-1-13-2-released/

> date pickers

<input type="date"> is too rough I'm guessing? I'm not exactly sure where it falls short personally.

I don't use much jQuery any more but I thought it papered over a few bugs in browser bugs (I vaguely recall jQuery having to work around a DOM selector bug in mobile Safari in the last seven or so years).
Sorry if this sounds naive, but... do people still use jQuery for new projects? I was genuinely surprised to see it was getting releases anymore, given how much of its functionality can be done with native JavaScript now.
One thing that gets forgotten about jQuery is that there's a tremendous library of very evolved components in its ecosystem. Sure, "you don't need jQuery" is true, but when you go hunting for components you'd rather not write yourself, man is there still some gravity there.

You ask yourself, "do I feel like writing a calendar selector widget today?" Trade some vanity and JavaScript puritanism and the question becomes "what color should I style it?"

The API jQuery gives you is still so much nicer than regular javascript, even with modern ECMAScript 7+...

While we're at it - Bootstrap (and similar css frameworks) are still much nicer to use than native CSS, even with modern CSS3 and flexbox...

It's almost like the designers for these native-API's look at what the community uses, and then decide to do something similar, but different just because.

I've not used it in a new project for a long time, but I often still work on projects with legacy jQuery code.

The main reason to still use it imo it is simply that a lot of devs are familiar with the API and they have really good docs.

While I prefer vanilla JS for JS-light projects, I'm also aware of some cross-browser weirdness and combability issues you might run into with a vanilla JS project. The nice thing JQuery is that you know it will work as expected on the all browsers it supports so you don't need to worry about cross-browser testing your code. It also makes certain things easier to do like basic JS animations.

The main reason care about the latest releases is that they patch security issues from time to time.

Yes. Technically you could always use native JS in place of jQuery and have the same functionality. But jQuery's power came from abstracting away some of the messier and more complicated elements and giving developers a more intuitive set of tools. Some part of this are less necessary today than when jQuery v1 came out (like `querySelectorAll()` vs `$()`), but other parts are still enormously helpful (like `$.ajax()`). So like always, it's a trade off. But it's still one that comes up as worth it as often as not.
I find it much quicker to write and neater to read than vanilla JS. I optimise afterwards and might consider swapping it out but it's usually low down the list of performance issues. Although it can be a bigger issue if you don't know how select things and store those selections efficiently with it.
jQuery is like, comfort food for me? Used to use jQuery for everything and now the world's moved on. I wouldn't want to do a large project today in jQuery, but I kinda miss the simpler projects that I used to do all the time with a smaller toolbox.
I used jQuery earlier this year.

I am not a web developer I learnt HTML in the 90's (When Frames and Tables were the way to write web pages). I have not kept up to date with current State of the art in web development. I know enough about JavaScript to read source code and kind of understand what it is doing but don't know anything about best practices or the 'proper' way to write it.

I needed to throw together a simple webform to submit a date as one of the inputs. I was having problems getting it to work consistently across different browsers.

One of the issues I was having was I needed the date to be in the Australian date format (DD/MM/YYYY) but one browser (I can't remember which Edge maybe??) kept insisting on using US style dates MM/DD/YYYY it caused me a lot of frustration maybe I just didn't know the correct phrase to search google for but I could not work out how to make the browsers built in calendar picker force the date to be in a specific format.

So I just used the JQuery calendar picker took me two seconds and problem solved.

Apology accepted, and absolutely! Myself and two other developers just kicked off a very non-tivial, data-heavy application for a Dow 30 that will be used by a maximum of 12,000 users. Using jquery will help us avoid a lot of thinking and testing time with the whole "gee, how would I do that in vanilla, let me look that up" process.
Bootstrap 4 uses jquery, bootstrap 5 was released (not beta) May 5, 2021. So, anything started with Bootstrap 4 would use it.
I am still using jQuery because I have so many plugins such as calendars, photo galleries, video galleries, and file explorer type trees that are all progressively enhanced, it would be a ton of work to rebuild everything. I think jQuery is still does a great job for progressive enhancement of CMS/informational type websites.
jQuery is more popular than React by pretty much any metric you can find
It always could be done in JavaScript, jQuery is written on it after all.

It’s just that it’s a lot better and easier. The fact that we haven’t standardized on jQuery’s API is one of the greatest missed opportunities in the field.

i don't intentionally write code using JQuery anymore, and find it not very inconvenient to avoid for the most part, even when writing "jquery style" JS -- which I do. Browser API's in recent browsers are good enough.

But I'm still using some dependencies that need jquery.

I honestly expect I'll never be able to get rid of it.

Yeah a good few years ago, before I had learnt about frameworks like React, I used JQuery for one of my projects. Once I learned about React, I decided to rewrite this project using that instead, and afterwards I felt that the React version was very obviously the superior version. I just feel like we now have better options, and I still really like React's way of handling state in a moreso functional way.
Yep. It is the first package I install on a new project. Followed by React.
I only encounter it when maintaining old codebases. Never for anything new
Yes. I do still use it.
By day I code in react, but I'm working on a side project where I needed to use a specific already developed calendar widget. Found the one I needed and it was written in jquery. I started trying to get react and jquery to get along, but in the end I ended up scrapping react altogether. This of course was not my initial intention.
I feel like React and JQuery approach things so differently that it almost never should be a question of “Should I use React or JQuery?”…
Why couldn't you use both? I've never had issues with them together.
Tbh this is not a problem of react
The advantage of Vue, Svelte, and React is the neat decoupling of changing state and responding to those changes. jQuery always seemed to end up in long chains of callback hell.
"Decoupling" is not a phrase I'd personally use to describe a benefit of React.

Every React example I've seen is a horrific-looking mixture of JavaScript, XML, and HTML all muddled together into a nasty-looking component system.

When I was learning front-end development it was an absolute cardinal sin to mix markup, JavaScript, and styling together. Now that seems like the standard practice and I still can't look past it.

Because it hails from a different and terrible era. It's easy to forget the impact that jQuery had in front-end development.
JS in ~20020 - Use onclick handlers to respond to user interaction. JS in ~2004 - Use jQuery to decouple your JS from your HTML in separate files. JS in ~2008 - We invented our own onclick handler, embed your JS in your HTML it's fine now.

EDIT Spelling

I super love jQuery.

As an infrastructure engineer with zero interest in Frontend trends, jQuery simply gets the job done.

Someone just today was complaining that css doesn’t have contains. Something as simple as that makes jquery useful. It’s also not a huge library and extremely powerful. It gets a bad rap.
There is jQuery 4.0 in the works(95% done), not sure what new feature it brings. https://github.com/jquery/jquery/milestone/7 it's updated a while ago though.

alpine.js could be an alternative to jQuery.

wonder if jQuery is still used for new projects these days.

Alpine.js has been a wonderful new tool in my arsenal.

I prefer lightweight tools that solve big problems while still staying small/simple. Alpine.js really hits that balance for me. The fact I'm able to drop it in without a single Node.js/etc build tooling is astounding (esbuild, rome, etc). I really prefer how it stays true to vanilla JS/general web development while also bringing modern attribute-driven reactivity to the table.

I'm aware of "You might not need jQuery", but has anyone created a comprehensive list of everything jQuery offers that is not available through native JS/CSS?

I guess I should specify, not available as easy as jQuery. Technically anything that jQuery does can, obviously, be done natively, but I remember there were some things that were much much much easier to do in jQuery than natively. Some of those easy patterns have been adopted into native, but surely not everything.

Just so happens I translated an old JS library from 2013 to modern TypeScript yesterday. It has jQuery, old-style “classes” with prototypes and everything. The language has changed so much in ten years it’s barely recognizable.
One of the senior devs at a place I worked at built his own react-like component system using jQuery and they had a couple apps foundationally upon it. I also wound up on a project to help out with a pretty recent greenfield Angular SPA. Turned out actually they just used the router from angular and ejected into jQuery for nearly all component/dom manipulation. Of course everyone else was rolling with it like it was cool or no big deal. PMs were happy with the team's velocity.

Times like that make me highly qustion my career choices; especially when their pay scale is similar.

In this thread there is a lot of both "you should use this", and "you shouldn't use this". In the end, everyone should evaluate the options for themselves and use what works best for them.
Main reason to use jQuery for small projects: the learning curve is like a dot.
CSS variable values are trimmed of whitespace [according to spec]?

> Return undefined for whitespace-only CSS variable values

I've gotten in the bad habit using of CSS vars for dynamic text, this will shoot me in the foot some day.

Feels like Winamp but things eventually evolved on server side. Always welcome on my legacy .net project:)
jQuery is awesome, use it in most of my projects. Its easy to read.
Too little too late.