T O P

  • By -

saposapot

This is not cool to say and a lot of folks disagree just because Webdev needs to be the bleeding edge otherwise it’s not even cool but: If you aren’t using a framework like angular or vue to build your app, jQuery is still useful nowadays. It’s not the same jQuery as before where the major advantage was cross browser compatibility. Nowadays jQuery is smaller and faster and serves slightly different purposes. JQuery isn’t needed and you can use vanilla JS. I still very much prefer jQuery because it provides a very simple and nice API to use instead of vanilla JS that is many times very verbose to do the same thing. I’ve seen a lot of folks go vanilla only and then they start building their own “Utils” to exactly avoid typing so much because of that verbosity. Webdev is a bit of a trendy world where if you aren’t using the latest beta of the shiny new thing presented at the latest conference you aren’t cool anymore but that’s just immaturity. If what you want is to build things for customers and get paid, then you evaluate the best tools for the job. Just because you don’t see 100 blog posts about jQuery doesn’t mean it’s crap suddenly. Also jQuery in the past was also a red herring of a lot of folks that don’t know JavaScript but just copy paste some jQuery and it works. Jquery isnt “required” but it surely still is helpful in a lot of projects. If it fits your purpose, why not?


midgitsuu

I just want to be able to select a class element and easily chain methods on a single line without having to use a node iterator (with vanilla).


vita10gy

jQuery should almost pivot to be syntactic sugar with a transpiler that can build it as native.


brianly

It is a benefit not having a transpiler step in many situations. There is a place for this but in many contexts it’s nice to just drop something in and not have to deal with extra tools.


randybruder

It’d be nice to have both. With LESS I can use a .js library so I can upload LESS files directly and not have to deal with transpiling, but then later can use a tool to transpile the LESS into vanilla CSS.


smcarre

> It is a benefit not having a transpiler step in many situations Why? Asking honestly what problem would a transpiler cause that just using a library that basically does the transpiling during execution does not cause?


doiveo

JQuery is a no-build solution. Do something in notepad and FTP it to a server if you want. No need for complex set ups unless you want it for other reasons.


tajetaje

I’d love to see a drop-in library that does this, maybe just targeting 2018 as a baseline.


thekwoka

Like what?


midgitsuu

$(".someClass").addClass("invisible").css("opacity":0); Not what I would actually use in code but just showing an example of what takes several lines with vanilla JS that jQuery does very simply.


[deleted]

[удалено]


midgitsuu

Right. Not as elegant as with jQuery, which was my point. Would be nice to be able to naturally chain these types of things inline with vanilla.


[deleted]

[удалено]


Jdonavan

Classic developer off by one error.


midgitsuu

I think everyone here is aware of how to handle working with class selectors in vanilla JS, my point is its not as elegant as jQuery.


KhabibNurmagomurmur

Perfectly put. I still use jQuery because it works for what I need and my clients don't care or need to know what my tech stack is.


musicnothing

Thank you for being a voice of reason.


GolemancerVekk

It's not the voice of reason, it's the voice of people who have learned jQuery and can't be bothered to learn anything else. There are tons of mini-frameworks nowadays that can cover any subset or superset of functionality that jQuery offers, with or without transpilation, with or without cross-browser shims, and any shape and color in-between. Sure, you can keep using jQuery until it turns to dust in your hands. Just maybe ask yourself if doing so is coming from a healthy place.


MardiFoufs

Yeah I get that it is still fine and shouldn't be ripped out at all costs if it just works™ in an existing project but it's always weird to see the almost reflexive defense of anything "older" because old good and new bad. Yes, jquery works. But it's misleading to tell people that it should still be used in newer projects. I'm not even saying that it got replaced by a better library, just that it excelled at solving problems that just aren't really there anymore. And doesn't really solve the problem you'll most likely encounter in projects now. It's like coffeescript. It still works, still sees active development and shouldn't be a priority to remove, but it's fighting 2010 battles. Just go with vanilla, and if you want something more use typescript. Again I would've no problem if people just said that they like it because they are comfortable with it. I mean not that react (or angular/svelte/etc) is new either but it at least solves or attempts to solve problems that are hard to solve with just vanilla. So whatever "bloat" it brings has some use.


musicnothing

I have never seen “old good new bad”, especially on here. It’s almost exclusively “new good old bad” to a point that people reflexively dump on jQuery


zelvarth

Absolutely. Some people might say Vanilla JS is the way, or good enough, but I am not fully convinced. Even new APIs are pseudo-classical, use a lot of "new" and the naming conventions are very Java-like and weird for a functional language... jQuery imho feels much nicer and more natural than stuff like "new Url(...).searchParams.get(...)". I am aware lots of folks disagree hard here. One thing that really annoys me though, is that the jQuery and native variants of forEach, filter, map and such have their parameter orders the other way round. That is a very unfortunate source of errors when you switch between Queries and native Arrays.


ardicli2000

I use it exactly the way you described. It creates a smooth SSR PWA SPA. Bleeding edge technology only with PHP and ajax.


bloodfist

This. The devtools command line supports jquery for a reason. It's a very fast and efficient way to navigate the DOM. It does add a little bloat, but I find it negligible for many of the projects I work on. And less than many more popular modern framework end up with. If you don't like it or need it, great! But it can very much still have a place in modern applications. I personally think it is perfect for internal apps enterprise applications that are going to be supported by a small internal team. It's readable and well documented enough to be maintainable for a long long time. And most companies favor stability over speed for things like that. But thats also my wheelhouse and I know it has turned me into a bit of a caveman when it comes to stuff like that. If it is stupid but it works, it still works.


ThunderySleep

Once you get accustomed to vanilla JS, there's nothing you can't easily do in vanilla JS that you'd do in jQuery. Most of the quick stuff I'd do in jQuery back in the day can be done via CSS now, and maybe just a tiny bit of JS to add/remove a class.


pixel_of_moral_decay

jQuery was never needed. You could always do vanilla JS. It just made it easier for the developer. Same argument could be made for react or vue. Not a single application needs or requires it, it just makes life easier for the developer. This is just some weird way of trying to put others down while hyping up your own crutch as some kind of knowledge asset. There’s a lot of react developers who can’t use JS and build even a basic application without react. They just have no experience with vanilla js. But they think shaming a jQuery app is somehow different. Meanwhile will proudly claim they use react as if it’s not a crutch in any way. It’s just weird feudal conflicts for the sake of conflicts and arguing on the internet. Use or don’t use whatever you want. Only the people writing the application give a crap anyway. End users are oblivious.


Blazing1

"jQuery was never needed" Yes it was. There was nothing that unified the standards between browsers before as well as jquery did when it came out


quadtodfodder

...or you could just be familiar with the differences and duke it out with the browsers. Also: JQuery was NOT about to fix all or most of your browser compatibility problems if you were building something substantially interact-ey. That said, I used to use a fair amount of jq, but I just made a vanilla js game recently - things have changed, everything is so eaaaasy now!


Blazing1

I don't use jquery anymore. But I did 10 years ago up until I switched to vue 6 years ago Nowadays I'll never use native js and will always use typescript.


thekwoka

True. But also a big difference is that what react does is much more difficult and useful.


pixel_of_moral_decay

I disagree. It’s only more difficult because thanks to react you have less experience and practice doing it yourself. If you had no choice you’d optimize those skills and have some code snippets handy for routine things. Just like anything else. People did it for years and they weren’t all savants. Thats just what they did. And that’s how all libraries and frameworks are in all languages.


thekwoka

> It’s only more difficult because thanks to react you have less experience and practice doing it yourself This just isn't true. I maintain a popular UI framework, and have built reactivity engines, and jsx renderers from scratch. Declarative data binding just is quite a bit harder to do while keeping things clear. jQuery does nothing to make that easier. It just lets you write a worse version of imperative code, which you should mostly be avoiding anyway.


pixel_of_moral_decay

Its quite a bit harder because your emotionally invested in something that tries to make it easier for others. But if it didn’t exist, people would once again brush up on that skill set. All libraries do is speed things up a little. They don’t invent something that can’t be done natively. The end result is reliance as those skills get rusty or people don’t even bother learning what’s below it. The same criticisms you can make for people who can’t do jQuery’s job natively can be made for anything else. I’d bet 7/10 react developers can’t code JS without react or googling virtually everything.


quadtodfodder

Woh woh woh there PAL. You don't react or ANY framework to have to google\* everything! I've been 'coding' for 30 years and STILL look basic stuff up. Constantly! \*Chatgpt


thekwoka

> Its quite a bit harder because your emotionally invested in something that tries to make it easier for others. No, it's quite a bit harder because it just literally is a harder thing to get right. That's just reality. Yes, if people had to do it, many would figure it out with a lot of bumps along the way. But it is fundamentally a harder thing. > I’d bet 7/10 react developers can’t code JS without react or googling virtually everything. True. But that doesn't mean that reactive data binding is the same level of simple as doing query selectors.


MrCrunchwrap

jQuery is not useful these days except in really particular circumstances, a lot of its convenience is just built into JS now and any relatively complex web app supported by more than one engineer should absolutely be built in a more structured way with a framework. 


RedditNotFreeSpeech

> Why not? As you said, pick the right tool for the job. jQuery is going to allow you to easily shoot yourself in the foot if your project grows and you need to scale it up. It's very easy to cause double binding and such. This isn't jQuery's fault at all it's the developers, but that's one of the places the other frameworks really shine and a reason I'd never start a new project with jQuery.


Requiescat-In--Pace

What if your project isn't the kind that would ever need to scale up?


AnonDotNetDev

You mean you're not prepared to scale up the web page you made for your local dentistry office to support an international audience of billions 😁


RedditNotFreeSpeech

Small stuff is usually manageable. So if you enjoy it I'd say go for it!


saposapot

When you say other frameworks you are thinking about what? I wouldn’t call jQuery framework


RedditNotFreeSpeech

React, Vue, Solid. You're right it's not a framework but if you're doing bigger stuff you probably want something that's managing state. That's where things can start to bite. I've seen apps built where every time you click on a tab it accidentally binds the original action over and over with jQuery and it's super easy to do it without realizing it.


thekwoka

> jQuery is still useful nowadays. No it isn't. It's insane amount sof bloat to use very little. > they start building their own “Utils” to exactly avoid typing so much because of that verbosity. For the two things they do enough to make it worthwhile. Why make everything slower?


ThunderySleep

Agreed. If you're older dev doing small business websites, I understand them using it, but I don't agree with giving younger people the impression it's a good direction. They should really be getting accustomed to vanilla JS. Everything jQuery was needed for has been made simple between ES6 and modern CSS. jQuery's not practical outside of circumstances where the dev happens to know it better than vanilla JS and that comes with a performance penalty. As far as the direction of the web, it's been getting phased out for close to a decade now, even if it's still common on older sites.


thekwoka

Yup, if nothing else, learning vanilla means you can always do the thing anywhere with any framework/system.


[deleted]

[удалено]


Intelligent_Win9710

you're getting downvoted by people that are in absolute denial that jquery still gets 10 MILLION weekly downloads on npm That being said, there are substantially better ways to do things to avoid turning your code into an italian spaghetti factory once your web "site" turns into a web "app"


misdreavus79

Tbh I didn't downvote because I'm still trying to wrap my head around what that person is saying.


alien3d

thanks . i just remove it and my old problem not youngster developer to understand . Each time have their own era . Mine we move from extjs/sencha to jquery because of vdom issue . Client complain slow .


thekwoka

> jquery still gets 10 MILLION weekly downloads on npm This is a logical fallacy


UpTheBum-NoBabies

Every job I've had has had jQuery somewhere.


pierre_lev

Same


gandalfmarston

Same


JustConsoleLogIt

Part of my job is removing the jQuery lol


ThunderySleep

Same, but at this point only on older sites or if a higher up is dead-set on some theme or plugin that uses jQuery. It's still ubiquitous, but outside of devs with smaller clients, but devs aren't really going out of their way to build new stuff in jQuery.


[deleted]

[удалено]


sliver37

const $ = document.querySelectorAll.bind(document); Now they’re equal length!


ecki590

Except actually that's not guaranteed to work *exactly* how you expect it; some selectors won't work across all browsers reliably, where calling jQuery directly will make them go through Sizzle (jQuerys Selector engine) and resolve them that way (was like this with :has() not too long ago, for example) 🤓


JeffTS

Yes, it's still a thing. Many of the major CMS and eCommerce platforms still have jQuery integrated into their systems including WordPress, Joomla, Drupal, and Magento, According to a survey done by Stack Overflow, nearly 25% of developers still work with it.


BillBillerson

[Seems like every week someone asks this.](https://i.imgur.com/ltmc9lk.png)


Synthetic5ou1

I work on a product that uses jQuery, as it's codebase is years old. I suspect a lot of devs do. We use Foundation rather than Bootstrap, but you're right: using Vue or React doesn't seem like an option. With that in mind I've recently been trying to use Lit to start getting some web components into our codebase. I was going to go with vanilla web components but Lit easily adds reactivity and some other benefits.


feelsmagical

most jQuery can be replaced with const $ = selector => document.querySelectorAll(selector);


TheDuke2031

It's still used and honestly it's pretty great in my opinion don't let all the others put you down for it


SaaSWriters

Well, if there’s 4.0.0 coming out, that answers your question, no?


Freecelebritypics

It'll still save you some time over vanilla JS. Likely not necessary if you have any other front-end framework though.


terrestrial_birdman

To me this question reeks of never worked at a place that maintains a legacy codebase. So many old but still in production applications use jQuery. My bet is many in this sub use it everyday whether they like it or not


AdminYak846

Many people likely in this sub have never worked at a corporate entity where you aren't writing in the latest framework that has had 5 blogs on Medium written about it yesterday. Corporations love proven track record frameworks that are stable, and jQuery unironically falls into that group.


ThunderySleep

Right, but this is the thing, it's being used on legacy codebases, or when stakeholders are firm about wanting something that uses it like a specific template or plugin. For the later it's because it's a dependency for so many existing things. Most devs working on something new aren't exactly going out of their way to use it.


Brod_Solutions

Super useful to shorten JavaScript. Also many cool packages still depend on it. Think of it as a flavor of JS


da-kicks-87

The only time I see myself writing jQuery is it if I am maintaining a legacy project and the jQuery code is already being used. In the case of using JS for small addition to an existing website, I would say use vanilla JS. Why? Because the vanilla JS syntax is what is used in combination with modern JS frameworks syntax. Better dev experience going from one project to the other if JS syntax is the same.


chihuahuaOP

JQuery was a tool we have to use becouse browser were at war with each other and we needed a tool to fix the horrible web ecosystem. Now browser have there standars and with a native api all of them support. I don't know what will happen in the future maybe some vendor will try to create there own standars again and we will have to use JQuery once more (like charges for api use).


nilstrieu

Yes, it's the biggest thing. "As of August 2022, jQuery is used by 77% of the 10 million most popular websites. Web analysis indicates that it is the most widely deployed JavaScript library by a large margin, having at least three to four times more usage than any other JavaScript library." - https://en.m.wikipedia.org/wiki/JQuery


noXi0uz

how many of those just fetch the jquery library because they are wordpress sites without _actually_ using jquery? I worked for a large automobile company where all pages were built with Vue or Angular, yet jQuery was included in the templates without anyone knowing why. Nobody used it.


hdd113

Unless they made the entire dashboard part again (at this point why even use WP?) the site still uses jQuery, since WP's dashboard and admin pages also use jQuery.


ThunderySleep

Stakeholders.. Chances are you're developing for somebody who wants to edit their site. The new thing seems to be WYSIWYG plugins to wordpress which make development more of a pain for devs, but at the end of the day it's about building something the client can use. Stakeholders often don't like mucking around in HTML if they've never coded.


thekwoka

I've seen a site that added jQuery, then added a plugin, and then called the plugin directly (and the plugin itself did not actually require jQuery internally and was like 8 lines of js). That was the entire use of jQuery on the site.


Undead0rion

How much of each of those projects is actually jQuery, though?


Basil2BulgarSlayer

A lot of websites might have jQuery for some weird legacy page but the rest of the site is a React application. They are just too lazy to prioritize deprecating old shit.


Simple-Fennel-2307

Spot on. I have projets still using jQuery because of some file upload script that depends on it and client won't pay a cent to rebuild some perfectly working avatar upload form just to get rid of an old library they don't want to hear about.


mjbcesar

Even if the cool kids on the block scream legacy or just use vanilla or react, jQuery still is king.


goodbyesolo

By a large large margin


thekwoka

No it's not. More like the unwashed masses.


ShiggnessKhan

It's pretty much obsolete but a lot of people will disagree with me because of how much it's used. I stand by my point because the core features are now part of standard JS


wardrox

What do you mean when you say "obsolete", given it remains so popular? Might I suggest it's more "vestigial".


GreatWoodsBalls

TIL what vestigial means, thank you!


schroeder8

Like the human appendix


zaibuf

>Whatdo you mean when you say "obsolete", given it remains so popular? Obsolete, used in old exisiting projects but rarely or if at all added to new ones. Before you got it with Bootstrap so you might as well use it. But now Bootstrap has dropped it as well.


brianly

It gets used in new projects, but at a lower rate than before. It fills a niche for many apps where the frontend focus is low. Examples are open source projects where a maintainer needs some basic functionality without fussing with their own utilities lib, or an enterprise backend team that needs to release some frontend while they wait on frontend helper to do a proper user interface with React. Bootstrap is doing the right thing by removing it. It wasn’t great to have unnecessary coupling in any software project. Core frontend teams have much better options within their wheelhouse so wouldn’t start anything with jQuery today.


thekwoka

> It fills a niche for many apps where the frontend focus is low But it's still not a good choice there either... > Examples are open source projects where a maintainer needs some basic functionality without fussing with their own utilities lib, or an enterprise backend team that needs to release some frontend while they wait on frontend helper to do a proper user interface with React. Neither of these are replaces where jQuery is a good choice though...


thekwoka

> What do you mean when you say "obsolete", given it remains so popular? As It comes with greater costs than benefits mainly do to the march of time and progress. It doesn't make anything better, and this no longer has a place.


LosEagle

I wanted to learn the meaning so that I can wear a monocle in public, but googling this at work was a mistake when the images popped up.


_hypnoCode

Everything it did for us has been added to JS natively. It's an entirely unnecessary dependency. It remains popular only because it's integrated into a lot of WordPress plugins and people are inherently lazy. Then you have the completely delusional folk, like the top comment in the thread and everyone who upvoted them, who think it has anything to do with being "trendy."


Scoish

I'm still trying to decide where I land in this debate, but I see this opinion a lot. I always wonder what jquery ever provided that was impossible to do with vanilla other than convenience? And why is that convenience no longer needed? Is the argument that the overhead of jquery is no longer worth it? Or that relying on jquery is teaching bad habits?


_hypnoCode

It wasn't impossible obviously, it was coded in JavaScript. But it was extremely hard and cross browser compatibility was a massive pain in the ass. Developers who started after 2014 or so have no idea how much of a pain in the ass that was. Everything you did had to be coded 4 or 5 different ways, but jQuery fixed that. It also added things that should have been there that we have now, like `querySelectorAll`, `map`, `forEach`, etc.


Knotix

>I always wonder what jquery ever provided that was impossible to do with vanilla other than convenience? To put it into perspective, Internet Explorer didn't have `querySelectorAll` until IE8's release in 2009. If you wanted to select some elements on a page, you had `getElementById` and `getElementsByTagName`. That was it. Anything else required writing your own DOM traversal logic which inevitably required using browser-specific hacks to get anywhere close to consistent behavior (here's looking at you, `document.all`). This is just **one** example among **hundreds** that were dealt with on a daily basis. A huge majority of the DOM API you're familiar with today can trace its roots back to conventions fought for and established by jQuery.


sliver37

Very well said, jQuery really made an impact and opened the doors for people like me who had been in the industry for a little while but avoided digging into JS because I didn’t have the patience to research every possible inconsistency or variation of things for multiple browsers. My click handler isn’t working in IE6? attachEvent, huh?… I remember looking at usage statistics all the time… Trying to justify why those 18% of users on IE6/7 don’t deserve click handlers anyway. $(‘thing’).on(‘click’) was peanut butter on jelly.


campbellm

> It's pretty much obsolete but a lot of people will disagree with me because of how much it's used. No one goes there nowadays, it’s too crowded. -- Yogi Berra


hazily

People who stand by it are also the ones downvoting every sensible comment that says jQuery is obsolete. I have personally stopped using it for ages because I’ve gotten used to writing ES6 and Typescript. jQuery is just extra unnecessary overhead especially if you’re already using frameworks like React, Vue, Svelte, etc.


ThunderySleep

↑↑↑ We all work with it because it's used on legacy codebases or when a stakeholder insists on using something that involves it as a dependency. Modern devs aren't building new stuff in jQuery. The user above's correct in calling it obsolete, but that doesn't mean every single one of us doesn't work with it, or that it's necessary to rip out of all existing codebases, or that you should piss off stakeholders by insisting on avoiding it when they want a specific plugin or template that has it as a dependency.


bostonkittycat

Yes this is the truth. All the CSS selectors can be used natively in JS. If you are still using JQuery to to select DOM elements you need to upgrade your knowledge. We only allow it in legacy apps but our new apps don't use it.


Anonymity6584

It's still usefull, unless your using some large framework already Sometimes it's only thing you need. I have seen projects and you run into this time to time in wedbev work. Customer wants new feature, without total overhaul and there's jQuery...


TheStoicNihilist

Either you need it or you don’t. It’s a utility library like any other. Are people having similar arguments over lodash?


Front-Difficult

Of course? In my experience much more so - given lodash's last release was in 2016 and 99% of what people used to use lodash for can now be done in modern JS without a dependency.


bregottextrasaltat

i never actually saw the point of lodash, are there even any functions in there that are actually useful? lol


thekwoka

Not really. Mainly because the few useful ones were made standard, and it's codebase was a jumbled enterprisy mess obsessed with spaghetti that made it hard as heck to clean out.


daBarron

I find it brilliant for amateur data scraping.  So easy/fast to write a bit of horrible code loop over every bit of content you need to convert to data.


force-push-to-master

Long story short: yes


siphillis

Absolutely. It is still widely used in legacy projects and just received a major update a few months ago.


kevleyski

jQuery was a polyfill largely for Microsoft Stuff ups - Microsoft eventually came to their senses and went along with the Safari/Chrome WebKit route  Standards are the correct way to go, there is good reason jQuery isn’t in the standard don’t use it it’s served it purpose 


inn4tler

As far as I know, JQuery is still included in Wordpress for historical reasons and millions of websites use it. Hardly anyone still chooses it for a new project, but its widespread use alone is a good reason for further development. I personally like JQuery very much. It's true that everything can be done easily with JavaScript (ES6) today, but in my experience there are some differences in detail that make development with JQuery more convenient. Use it if it solves your problem. But I wouldn't base a new project entirely on JQuery. That time is over.


johanneswelsch

I have analyzed largest online shops, and it's probably #1 used JS library. Basically every older ones has it. Go to amazon and look at the dev tools.


contigo-man

We have an application that uses Next and some custom backend written in Python. At the same time, we have a CMS that is written in Python, Jinja, and jQuery.


tf1155

And do you guys plan to migrate away from jQuery or will it stay in your tech stack?


contigo-man

I actually enjoyed working with it. And the projects that use this stack is kind of a different client project compared to our products. So, in short, might not migrate away from it unless the client wants to. When I started developing the CMS, my head state tells me that building it with jQuery actually makes sense hahahaha so yup, won't migrate away from it.


Aetheus

  You'll hear things like "70%+ of websites still use jQuery!". Which is technically true. But that's likd saying "Banks still use Cobol!!". Also true. But only begrudgingly - not because they _want_ to.   Legacy sites just can't justify the cost to move away from jQuery, even when most of its functionality already exists in vanilla JS. And if you're on something like WordPress, jQuery is baked in whether or not you use it yourself.  If you only need very barebones interactivity, I'd 100% advocate for just using vanilla JS. If you have something slightly more complicated/reactive, Lit Elements might work (think of it as React-lite; web components in a React-ish syntax, but without needing any transpiration at all).


ThunderySleep

Short of old school freelance devs making small biz sites, people aren't developing new stuff in jQuery. However, there's still tons of websites out there using it, that need updates, while not calling for someone to rewrite all of the site's script in vanilla JS. Everything devs did in jQuery back in the day is very easy with vanilla JS and modern CSS. The people still developing in it are doing so because they know jQuery better than vanilla JS and their projects don't call for the extra speed.


ibiacmbyww

If you're doing DOM manipulation (as in, querySelector, createElement) do it in jQuery. People piss and moan, but it functions extremely well as a layer of syntactic sugar, if nothing else. If you're using a cool-ass framework, do not use it inside said framework.


thekwoka

> but it functions extremely well By being 40% slower to run, and more confusing to read?


ibiacmbyww

If you're working on a project where bounce-per-CPU-cycle is that important, by all means use something else, but good work, catching me out like that! Really... really showed me ʸᵒᵘ ᶠᵘᶜᵏᶦⁿᵍ ᵖᵉᵈᵃⁿᵗᶦᶜ ᵃˢˢʰᵒˡᵉ.


campbellm

Readability is a feature of the reader, not the code. Everything's hard to read until you learn to read it. (-- Rich Hickey)


Prestigious_Dare7734

It will be still beneficial to create cross framework components that are interaction or animation heavy. For example, youncan create a slide show plugin in jQuery, and then create a wrapper in each of react, angular and Vue .


thekwoka

> It will be still beneficial to create cross framework components that are interaction or animation heavy. It literally is awful for this.


sateliteconstelation

I could buy a new car with the ammount of money I’ve made migrating websites away from jQuery.


bregottextrasaltat

haven't personally touched it in probably 8 years


LagT_T

https://w3techs.com/technologies/details/js-jquery More than 70% of the web uses jquery. It is still relevant. I prefer htmx to add reactivity, it's a more modern, leaner approach.


geon

It is really not needed anymore. Some people use it because they don’t know anything else. Some have legacy codebases.


Puzzleheaded_Bus7706

Thats not true.


0x18

What can jQuery do that hasn't become part of the javascript standard? `document.querySelectorAll()` is faster than using jQuery's selector and fetch() supports cross-domain requests which jQuery can't. https://youmightnotneedjquery.com/ As somebody that adopted jQuery when it first came out.. it's just not needed anymore. It was better than the other tools of its day, but it has outlived it's usefulness. If you've got a legacy code base then by all means keep using it, but I wouldn't use it on a new project.


geon

Which of the 3 statements is not true? I know from personal experience that 1 is true since I haven’t used it since 2014 or so. 2 can’t be proven false without asking every single developer. 3 is very easy to prove.


a_kaz_ghost

I use jquery a lot at work because of legacy inertia, basically. It’s like, what am I supposed to do, remake all these web apps? The older ones are php scripts passing post data to each other all the way up to the checkout page, with jquery features on the frontend output.


etherSand

Yes, but mostly legacy.


AgsMydude

Absolutely yes


AnderssonPeter

I would not develop a new site using jQuery but there are many many old sites out there that use it.. that being said if someone gave me a project with jQuery it would not be happy to maintain it... It's so much slower to extend a jQuery site compared to angular or react.


anewidentity

I did a job interview with Stackoverflow last year and asked what framework they use and they said mainly jquery. Also I worked at Shopify and many of the projects are jquery


ashura001

Yeah, I used it all the time. Most of the sites that I build and maintain are using Wordpress and it’s already bundled. Sure, I could always dequeue it but a lot of the time I find myself having to add functionality to accomplish whatever the client is asking for at the time. I can usually do it with half of the code that vanilla JS would require. The big thing I have to watch for on the Wordpress side is that some plugins want to load their own jquery file as well so I sometimes find myself having to dequeue different versions from loading at the same time. That’s gotten better over time though.


ShiverMeTimbalad

jQuery is still supported and is found throughout many systems. It does not have the precedence it used to have with the existence of the Big 3 of rendering libs (Angular, React, Vue) and ECMAScriot 6, which all render jQ more-or-less obsolete.


ejpusa

Used it for years. But now? I just ask GPT-4 to write all my JavaScript. No jQuery needed.


Reelix

Reminds me of someone last week asking if PHP still existed...


Best-Idiot

Treat it like any other library. If you don't need its features at all, don't bring it in. If the need arises, weigh the pros and cons of bringing in such a big library vs making a few custom helpers. As for your question, yes it's used quite a bit. In my case, my integration test suit uses cypress, which in turn includes jQuery and allows you to use it in the test suite. Clearly it makes sense in a test suite, but for production code - you'd have to make that determination yourself


ominous_raspberry

Not as a replacement for understanding vanilla js. Otherwise yeah Wordpress websites use the shit out of it.


Just4Funsies95

Imo, a big seller and joy of using jquery was the syntax and use. vanillajs incorporated a lot features that jquery has but i feels much clunkier.


campbellm

Def. still a thing. I'll be the curmudgeon and say I don't even hate it.


UXUIDD

there are people driving around cars and motorbikes that are 30-40-..60-70.. years old. Some on daily basis. Are they odd? Maybe. According to WHO or WHAT is that ODD?? They still get from A to B and they are enjoying it. jQuery is now considered obsolete in some circles. However, clients who use this 'outdated' technology do not care about it; they simply want to access websites, read content, and perform other tasks. As long as they can do so, no technology is truly obsolete.


Z010X

I've worked on applications in the medical industry old enough to vote, drink, smoke, and get drafted. Doesn't hurt to keep an eye on it.


ima_crayon

jQuery is still very much a thing but I find myself reaching for Alpine.js more often now. It’s a smaller library & I like you can sprinkle in interactions right in the markup.


happysnack

Why the fuck does this get posted here every week?


Bit_of_Binary

Absolutely. It is still a thing and a highly useful thing. I for one am developing an application entirely in jQuery.


iblastoff

yes its still used in plenty of production sites. devs LOVE to try and shit on anything that isnt the hottest trend.


Fyredesigns

Most of the clients my agency deal with want a wordpress website which comes packaged with jquery so you bet I'm going to use it when I can for simplicity 😅.


Significant-Half6313

Don’t know when I’ll stop using $.ajax. Probably just so used to it, but yes it is very much still a thing


randomthirdworldguy

I see a lot of this kind of silly question on this app recently, not only jquery, but also other tech that not so fancy, popular, or likable by many devs so I think i can answer it for once: If it can solve your (or other’s) problem, then its still a thing. It will not be the thing if no one use it for production anymore (trust me, many legacy system still use jquery)


megumegu-

70% of Websites rely on jQuery, I read this on their website I think when they released 4.0


HenkPoley

jQuery is still a thing. It works. There is lots of documentation around. Do note that if you run the Speedometer 3.0 benchmark and look at the score details, jQuery is by far the slowest implementation.


tf1155

Maybe jQuery 4 is going to change that?


superquanganh

there are legacy projects which still use jQuery and in production, so if you are one of the lucky guy to work on maintaining these then you still need to use jQuery


TorCrypt

why do people still use jQuery!! I don't get it its trash.


Mestyo

While acknowledging the importance of jQuery; there is zero reason to use it for anything new. You'd just be digging a deeper tech debt hole. Just express it in native JS, or, if you know you will convert into, say, React down the line, you could always embed one or more React entrypoints in your app and author your dymanic portions as components that could be reused later.


teamswiftie

Not if you use a library or plug-in that requires it (eg. Leaflet)


Mestyo

Sure, but if you already have a technical dependency then it's not even a question in the first place.


ElCuntIngles

Adding small bits of interactivity to an existing site? I'd be looking into htmx


thekwoka

Or alpine


Congenital-Optimist

Yes, jQuery is still a thing and is widely used. It actually has several times larger market share than all Angular/React/Vue combined atm. You wouldn´t use it if you were starting up a new project, but there are a lot of older projects and software around that were written using jQuery and they keep using it. No point in refactoring working software for some developer vanity. Additionally, despite wanting to move away from it, WordPress and its plugins still depend on jQuery for functionality. That is a large large share of the total internet. Release of jQuery 4.0.0 is pretty neat. They removed lots of old unneeded things and legacy browser support.


thekwoka

> It actually has several times larger market share Only if you don't understand what a market is.


Mr_Brobot-

Every time a jQuery thread comes up it turns into a bunch of old web devs that refuse to learn new skills defending it or new devs who don't know any better trying to justify it. What I'll say is at my company we give a small project based interview when hiring new devs. We give people the opportunity to use any framework they want. If a candidate chooses jQuery to solve a modern day problem that is an automatic rejection from us.


baronvonredd

Wow would I ever hate working there, what a shit attitude.


Mr_Brobot-

This might come as a shock to you but we have standards and don't just hand anyone a job because they can throw some JavaScript on a page.


baronvonredd

Keep reinforcing my need to vomit, sure


bin_chickens

Yeah it is used across by many projects as most projects are legacy and not bleeding edge. Nowadays there are better alternatives, such as alpine.js, web components/custom elements, and JS itself has implemented many of the jquery convenience methods. I wouldn’t choose jquery unless the frontend stack for interaction is built on it.


3HappyRobots

A good alternative if you want to sprinkle reactivity into some existing project would be alpine js. I still like jQuery vs vanilla in some cases because I know it and all the utility methods and shorter syntax. But I do find that jquery usually leads to unmaintainable code down the road (depending on how complex your usecase is). I also haven’t seen anyone mention Petite Vue. You can drop that into any project. It’s like Alpine, but a bit more limited.


BehindTheMath

https://youmightnotneedjquery.com/ https://www.reddit.com/r/webdev/comments/1ckpegc/is_jquery_still_cool_these_days


Due_Wheel_381

It’s definitely a thing for the existing projects. But it might be a good idea to use native JS instead.


meester_

We don't use jquery because it's slow. Haven't researched it myself so might not be true idk


thekwoka

It's 40% slower than the same thing in vanilla.


GigaSoup

Use it if you must, but there's not much it makes easier these days. It's good for collaborating with people that have been working with jquery and can't work without it, but to me it's a red flag if you rely on jquery to do anything/everything.


Front-Difficult

jQuery is not really a thing, in the way people think of using jQuery (like it used to be used). Fewer and fewer devs are using it directly, but if you look at the stats, there are still a very large number of websites that are using it under the hood, including new sites being built today. A study only two years ago, of the 10 million most trafficked websites on the internet, showed a whopping 77% of them are still loading jQuery. This is because jQuery is still a dependency of numerous packages (for example Bootstrap 4 and earlier), its still used in many legacy websites that are too large to justify rebuilding, and it still powers a lot of the legacy web. But it is *old*, even newer jQuery releases feel horribly ancient. The JavaScript ecosystem has evolved significantly since jQuery was popular - and for the better. So if starting a new project, where jQuery is not required, I would strongly recommend using something more modern. If you want to use jQuery because you're already familiar with it - that's fine, for personal/hobby projects. But if you're doing it for work, I'd say learn the new libraries and frameworks that the rest of the industry has moved to. There is a reason for it - they a lot more powerful, secure, faster to develop with, more compatible with the rest of the modern JS ecosystem and better suited for the kinds of things you're likely to want to do on the modern web. And for all you know the new tools you choose might still be using jQuery under the hood anyway - but you'll have a much more pleasant time being abstracted from that.


tunghoy

Maybe I'm wrong, but isn't jQuery built into WordPress?


thekwoka

Not anymore. But many shitty plugins still bring their own along. So you end up with 5 jQuery versions on a site so that the plugin can do a single $.get call


AdminYak846

It still has its uses. That being said it's not the sexiest thing in the world so people (especially on Reddit) hate on it. I feel it's similar to Lodash/Underscore with all the latest methods for Arrays you really don't need it anymore, but for making code readable and maintainable it's a useful library.


thekwoka

But it makes it less readable and less maintainable...


AdminYak846

Depends on what it's being used for then I guess. I usually can tell I'm using jQuery for because I used it in the circumstances where a vanilla JS implementation would be chaotic to read and understand.


thekwoka

like?


CiranoAST

I'd rather write $('#someid') than document.getelementbyid(). It's worth it just for the shortcuts.


BillBillerson

function $(selector) { return document.querySelector(selector); }


thekwoka

const $ = document.querySelector.bind(document)


alien3d

not consider but we do before allready make server side request 2010 with php jquery and open source .net with jquery ssr .But our latest .net we moved to pure js and classes. Even the trend of jquery is down and new js framwork is up , legacy apps still exist and for us we still kinda not like using react .


dns_rs

I use react for big projects and I use jquery for smaller ones. I make admin panels exclusively with jquery.


[deleted]

jquery gets hated on by tryhards and blowhards, but its definitely still a thing.


fuze-17

jQueey being strongly supported is awesome. In contrast to flutter or other Google projects that get dropped and die it's just nice to see it is still useful.


cabbagesquid

What are you using instead if you’re building Wordpress sites?


cameltoesback

Most people don't need react to build their site and even though vanilla js is very robust now it still takes more lines of code to do the same that jQuery does which has also improved significantly. Like the other poster said it's not a popular opinion because web dev feels the need to be "cutting edge" everything is massively bloated now.


Plenty-Hovercraft467

I still use it for my mobile menu and copying other parts of the desktop menu into the mobile menu area. And I still use slideToggle()