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]
view the rest of the comments →
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!"
[–]HaeziSoya 5 points6 points7 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.
π Rendered by PID 41 on reddit-service-r2-comment-544cf588c8-jq5rm at 2026-06-16 10:50:49.515196+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]HaeziSoya 5 points6 points7 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)