Is jQuery still relevant?

Is jQuery still something to learn as a junior?
Bootstrap 5 is not using it anymore if im right.
And I heard that vanilla JS can do everything nowadays.

Is jQuery still something to learn as a junior?

imho…

If you have a job that doesn’t need jQ, then I wouldn’t bother. If you’re still learning and want to be ready for the job market, it’s good to learn the basics - it’s used on fewer and fewer new projects, but there is still a lot of legacy code out there and will be for a long time.

And I heard that vanilla JS can do everything nowadays.

Well, JS could always do what jQ did - jQ is built from JS. jQ just make somethings easier, namely DOM manipulation, AJAX, and browser compatibility. Browsers are more standardized than they were before, AJAX has gotten easier now that JS has fetch, and DOM manipulation is often handled by better libraries (imho) like React, Angular, and Vue.

4 Likes

Stats from wikipedia:

  • In 2015, jQuery was used on 62.7% of the top 1 million websites (according to BuiltWith), and 17% of all Internet websites.[17]
  • In 2017, jQuery was used on 69.2% of the top 1 million websites (according to Libscore).[6]
  • In 2018, jQuery was used on 78% of the top 1 million websites.[18]
  • In 2019, jQuery was used on 80% of the top 1 million websites (according to BuiltWith),[18] and 74.1% of the top 10 million (per W3Techs).[5]
  • As of Feb 2020, jQuery is used by 74.4% of the top 10 million websites (according to W3Techs) . [19]

I don’t really consider using jQuery any more when starting new projects but I do a lot of work on legacy stuff that uses jQuery. Looking at those stats there is a good chance you will have to mess with it for at least the immediate future. The good news is that it is very easy to learn and you should be able to get the gist of it within a few days.

2 Likes

Hi @sconty, nice to see ya again :smiley:

Yes, jquery is still used on a lot of sites currently active. It isn’t used nearly as much for new sites, but there is a lot of jquery code out there currently.

Bootstrap 5 is still in alpha development (according to npm). Bootstrap 4 (the latest) is still downloaded millions of times a week (source)

Vanilla JS is better than it was back when jquery was almost a requirement. Common use-cases were different depending on the browser. Such issues are the ones “fixed” with modern browsers, who are vastly more standardized to prevent such issues.

Going back to “should I learn jquery” yes, you might not need to be an expert in it, but at least familiar with it because odds are you will run into it eventually. You also should continue to learn more than just standard JS, as standard JS might be more stable today than it once was, but it still just is the standard language and syntax. If you want to build more complex applications, you will probably either build your own framework, or just end up using one that is already built (like one of the front-end frameworks)

Good luck, keep building, keep learning!

5 Likes

I’d recommend learning vanilla JavaScript, esp. DOM API properties and methods first, then learn how jQuery abbreviates that syntax. Do very small code snippets just converting vanilla JS to jQuery then move to small projects.

2 Likes

Keep in mind that in those stats like " jQuery was used on 62.7% of the top 1 million websites", realize that a lot of those are WordPress sites, which represent more than 1/3 of sites overall. That means that a large chunk of those numbers show up as “jQuery” sites but most of those don’t employ jQuery developers.

A look at the Stack Overflow jobs board finds these hits for these searches:

search # hits
“react” 729
“angular” 334
“vue” 163
“jquery” 137

To me, that’s the most important thing - what’s going to get me a job. (And to be fair, I’m surprised that Angular is so low.) And some of that may be inflated by the “if they know effect” - and engineer is hiring for a position that doesn’t need some library but says, “OK, it’s an Angular job, but if they know jQuery, at least they’ve done some DOM manipulation and used a complicated library so we may be able to work with them” so they tell that to the HR person and it ends up on the resume as “jQuery required”. That’s how you end up with job postings claiming that they need React, Angular, and Vue. Sometimes they even include jQuery. Of course, those shouldn’t (and wouldn’t) be used together.

Again, it’s worth learning the basics if you’re starting out and want to keep your options open. And if you get a job that uses jQ, then go for it. But if you don’t have a job and you want to maximize your chances, I think something like React and Angular are going to be much more helpful - I’d rather do the basics of jQ and then dive deeply into a library that already has more market share and whose star is rising, not falling.

And I agree with SixStringsCoder that learning the vanilla JS way of doing DOM manipulation is a good thing, in fact, I might say that is more important than learning jQ. A lot of it is made obsolete by things like jQ and like React, et al, but it’s still good to know the basics.

1 Like

Thanks for answers!
Currently am learning JS, DOM manipulation, basics, etc. Im doing a bootcamp, and we gonna learn React from next year.

The same question for TypeSript?
I know its nothing like jQuery, but should I have a look after JS, or maybe only if a job requires it?

I think TS is on the rise. It is just an extension of JS, so you can use it anywhere you’re using JS, even React. Should you learn it? It would probably be a good idea as, again, I’m seeing it more and more. But if you know JS, you could pick up the basics of TS in a weekend. I wouldn’t say you need to run out and learn it now, but it might be something nice to add to your resume in the future.

1 Like

Realistically speaking, when you’re hired as a junior developer you’ll be assigned to work on tasks like adding new features and fixing bugs in an existing system. You won’t have the expertise or the authority to adopt new frameworks. Instead, you will work with the existing frameworks in the application. If you ask, “isn’t framework A more modern than framework B?” your project lead will respond that it doesn’t matter.

If you’re lucky, job postings will mention the frameworks. That will give you a chance to study a bit about the frameworks they use.

As always, learning to learn is far more important than learning details of any given framework.

And, beware an insidious form of job-posting bull***t: Sometimes a posting mentions leading-edge tech (React! Bootstrap 5! Typescript! Deno!) but the actual job uses less glittery older stuff, like jQuery. The recruiters think they can get “better” candidates that way.

You can always, and should always, ask “what technologies are actually in use?”

He’s right, these are tools built from the same languages in order to make things easier to use while developing.

Thank, Im going to keep in mind

I’m kind of in a similar boat as you: using javaScript, using React, using Svelte…oh crap, now I have to learn TypeScript.

So I’ve been gently (stress gently) adding it to my intake. Gently means, as I’m walking the treadmill, I have a YouTube video or Udemy video running about the topic. It means, when I fire up another Svelte project, I’ll try using it to see how different it is to how I currently code. BUT, it doesn’t get my full energy or hours of attention. I don’t force it into my projects because new things slow my creativity down.

Honestly, the basics of TS is just adding clarification to your code (“This variable is a string”…“This variable is boolean”…“This function should return a number”). There’s more to it than that but that’s it’s in a nutshell.

Learn both, jquery is great and easy to use,

They’re very different and you will find you prefer one over the other,

Personally I prefer jquery for its simplicity and imperative style, and I prefer direct dom manipulation and less declarative code, and also having all my js code in one file for a small project and not having to think about architecture and file structure on the frontend, esp. if it’s a full-stack app,

When you get to the Microservices and APIs and Information Security and Quality Assurance certificates you will end up fiddling with jQuery as those projects use it for the frontend, so for the frontend libraries certificate you might as well use React to get React learned and move onto jquery later, which is easier to pick up and use,

Are you saying you prefer jQuery (over what?) for full-stack or did I read that wrong?

I think jQuery is fine for small amounts of DOM manipulation, but for anything remotely complex you tend to end up with spaghetti code real quick.

Yeah if I’m writing a node server and only need a relatively simple frontend I much prefer jquery, if my frontend code is only a few hundred lines it’s just much easier than making a react frontend.

But as I said that’s personal preference working on personal projects.

Not to question your workflow but are you sure this isn’t a case of breaking a habit more than anything else?

If you don’t like React maybe check out Svelte. It’s very plain JS for the most part but with all the added benefits of reactive DOM updating. Doing manual DOM updating is really not (IMHO) something you should prefer for anything remotely complex.

1 Like

It completely depends on the project. I would use jquery for a simple frontend, I would use react for a more complex frontend, and both are worth learning.

Slight derail, but you may like alpine.js, it’s very good for simple frontends of the type that jQuery works best for. Tiny as well, and it only needs a CDN link shoved in the HTML for it to all work.

1 Like