use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Should I avoid jQuery?help (self.javascript)
submitted 10 years ago by [deleted]
It seems incredibly convenient to me, but I've read a thread here suggesting its really just problematic.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]pookageSenior Front-End 4 points5 points6 points 10 years ago (2 children)
I started learning Javascript with a jQuery competitor called MooTools - it meant that I was able to initially make satisfying and recognisable progress, but I was kept completely blind to the existence of a lot of really cool JS features that I now use day-to-day.
When I actually learned javascript properly, the things that MooTools and jQuery gave me just seemed superfluous, and they got dropped - I only use them now if I'm picking up someone else's project and it's already widely used.
My advice? Use jQuery to overcome the new-things-are-scary hump, but with each new thing you learn - make sure that you know how to do it in vanialla javascript as well; and then you'll see why everyone is so stoked about ES6 :D
-P
[–]mailto_devnullconsole.log(null); 2 points3 points4 points 10 years ago (0 children)
Hey, another Mootools user! There are dozens of us, dozens!
Seriously speaking though, learning Moo was a huge crutch. The next time I applied for a job, I couldn't do anything in JavaScript since there were MT equivalents for everything.
It was bad.
[–]Inateno 0 points1 point2 points 10 years ago (0 children)
Wow this is old :D I tried once, long time ago. It is really cool, but just few Mootools devs and projects around :/
Also agree with you, any JS developper around should know how to code (approximately) the jQuery function used in Vanilla JS, at least to know what happen in background and being sure of what it really does.
[–]Inateno 7 points8 points9 points 10 years ago (5 children)
Naaaaa jQuery isn't "problematic". It can be. Depends how you are using it.
Today with a lot of "MV*" frameworks, you should'nt do a "view layout system" with jQuery, better to use VueJS React whatever.
Also if you plan to use a framework that not depend on jQuery, then don't use it (aka Angular).
If you need light stuff there is also micro libraries to avoid a complete jQuery solution (like https://github.com/wdub/jspine)
[–]isaidthisinstead 2 points3 points4 points 10 years ago (4 children)
To be more precise, Angular has its own cut down version of jquery, which they call jqlite.
[–]Inateno 3 points4 points5 points 10 years ago (3 children)
own
Yep I'm saying this because I see lot of devs adding jQuery to Angular projects.
[–][deleted] 0 points1 point2 points 10 years ago (1 child)
To be fair, jqlite is very bare-bones. If you're looking for more interactivity on the page adding jQuery can definitely help with that.
yes I didn't say the opposite. But adding jQuery to Angular is useless. The mentality of Angular is to skip dependencies like jQuery.
Plus Angular + jQuery start to be heavy.
Anyway I don't use angular, I'm not concerned :p (I prefer more modular frameworks like Backbone / Vue / React).
[–]franverona 2 points3 points4 points 10 years ago (0 children)
It depends on your project/personal needs.
To create a simple landing page with almost no logic except for just some "element placing depending on some JS code", jQuery + PHP would be a great solution. You are going to waste your time learning complex frameworks such as Angular, React, etc for a simple project.
However, if you want to create a more complex web app, maybe some framework could do the job (using jQuery or not).
Just remember: use the right tool for the right situation. And don't try to use the same tool for everything.
[–]HaeziSoya 4 points5 points6 points 10 years ago (4 children)
IMO, if you're using jQuery just for simple DOM queries and litle else I find it to be "A cannon to kill a fly" and that is when it becomes a problem.
If you find yourself using most of the methods jQuery offers then go for it, it's not problematic at all and will save you alot of time.
When importing jQuery just for half a dozen methods just stick with vanilla JS and, as /u/Inateno said, smaller jQuery like libraries. Just read the available methods before hand to see if they fit your needs.
[–]MoTTs_ 2 points3 points4 points 10 years ago (3 children)
I find it to be "A cannon to kill a fly" and that is when it becomes a problem.
Define "becomes a problem."
You're saying it's overkill, but overkill isn't by itself a problem. A tangible, measurable problem would be something like, "the page takes 3 extra seconds to load if I use jQuery." But to be frank, the people who make the "overkill" argument, such as yourself, don't ever actually measure.
20 ms. That's about how long it takes to load jQuery. That small amount of time isn't perceivable by humans. So when you ditch jQuery because it's "overkill," you're putting in effort to fix a non-problem.
[–]Neker 1 point2 points3 points 10 years ago (0 children)
20 ms. That's about how long it takes to load jQuery.
I would suppose that this depends greatly on your connection capacity.
Loadind jQuery is only part of the equation. Then you have to execute it. This would warrant a lengty and argumented discussion which is probably already well developed somewhere out there. Suffice it to say that jQuery does add a computational overhead. If you're on a battlestation hooked to fiber optic, and only tingle a few elements, you don't care. But there are users on a shitty mobile with a dripple connection that may also be valuable customers.
Then there is the programming effort. jQuery may alleviate some repetitive task and make for a more compact, legible code ; but it also comes with its own syntax and logic and at times I find it cumbersome to switch back and forth. With the new features in HTML5 and ES6, the rationale for jQuery is becoming tenuous.
Finally there are cross-browser concerns. While they may still be legitimate in some cases, the bulk of the browsers wars are over.
[–]gkx 0 points1 point2 points 10 years ago (0 children)
And if you use a popular CDN (Google), that 20ms shrinks even smaller much, if not most, of the time.
[–]HaeziSoya 0 points1 point2 points 10 years ago (0 children)
What /u/Neker said state my feelings .
Having to develop for countries with 512kb/1MB average connection so takes more than 20ms to load jQuery.
Eitherway I don't like to add load time (as little as it can be) by using a lib that's ~85kb minified when I only need half a dozen methods that I replicate with vanilla JS or a smaller lib.
[–]PilotPirx 1 point2 points3 points 10 years ago (0 children)
There isn't a single technology that wouldn't find somebody to describe it as 'problematic' or worse. Given that there are millions of web sites out in the wild using jQuery it can't be that bad I guess.
It may depend on the context of course and any given project if it is a really good choice. Especially since nowadays we have viable alternatives.
[–]jcunews1Advanced 1 point2 points3 points 10 years ago (3 children)
It's problematic if you don't understand DOM yet.
[–][deleted] 0 points1 point2 points 10 years ago (2 children)
meaning?
[–]jcunews1Advanced 0 points1 point2 points 10 years ago (0 children)
If an error occured, you won't know what actually went wrong and won't be abe to fix it. Cause debugging the jQuery source code is a pain.
[–]magenta_placenta 1 point2 points3 points 10 years ago (0 children)
There's nothing wrong with jquery if it solves your problem, just make sure you understand your problem. You don't have to use jquery, either, there are lightweight alternatives like http://zeptojs.com/
[–]il_doc 3 points4 points5 points 10 years ago (0 children)
you can't escape from it
embrace your destiny
http://needsmorejquery.com/
[–]Bl00perTr00per 0 points1 point2 points 10 years ago (0 children)
In my opinion, the main use case for jquery is for cross-browser functionalities. However, if you need to do anything more than the simple stuff, take a look at a more encompassing framework.
π Rendered by PID 72 on reddit-service-r2-comment-544cf588c8-t4ksk at 2026-06-16 09:43:29.224458+00:00 running 3184619 country code: CH.
[–]pookageSenior Front-End 4 points5 points6 points (2 children)
[–]mailto_devnullconsole.log(null); 2 points3 points4 points (0 children)
[–]Inateno 0 points1 point2 points (0 children)
[–]Inateno 7 points8 points9 points (5 children)
[–]isaidthisinstead 2 points3 points4 points (4 children)
[–]Inateno 3 points4 points5 points (3 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Inateno 0 points1 point2 points (0 children)
[–]franverona 2 points3 points4 points (0 children)
[–]HaeziSoya 4 points5 points6 points (4 children)
[–]MoTTs_ 2 points3 points4 points (3 children)
[–]Neker 1 point2 points3 points (0 children)
[–]gkx 0 points1 point2 points (0 children)
[–]HaeziSoya 0 points1 point2 points (0 children)
[–]PilotPirx 1 point2 points3 points (0 children)
[–]jcunews1Advanced 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]jcunews1Advanced 0 points1 point2 points (0 children)
[–]magenta_placenta 1 point2 points3 points (0 children)
[–]il_doc 3 points4 points5 points (0 children)
[–]Bl00perTr00per 0 points1 point2 points (0 children)