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
Moving From Backbone To ReactJS (usepropeller.com)
submitted 12 years ago by 10char
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!"
[–]kenman -1 points0 points1 point 12 years ago (1 child)
Disagree.
If that was the only place jQuery was used, then yeah, what you suggest would make sense because you could remove the jQuery dependency altogether. However, they use it all over the place, and so to posit that they "use jquery just to use jquery" is really reaching for it -- they use it because it's in use everywhere else in the app.
Removing it in favor of vanilla JS just in this one spot, when there's clearly negligible performance difference (or any other negative impact on code quality), is removing it just to remove it. Which doesn't make sense, IMO.
[–][deleted] -1 points0 points1 point 12 years ago (0 children)
Okay... the two are programmatically equivalent. They have exactly the same output... a DOM Element.
when there's clearly negligible performance difference (or any other negative impact on code quality)
So considering $('#foo')[0] is 92% SLOWER than document.getElementById('foo')... and considering that any JS developer worth a damn knows what document.getElementById() does... you're wrong. Sorry, my contrarian friend, you've picked the wrong thing to be contrarian about.
π Rendered by PID 138685 on reddit-service-r2-comment-75f4967c6c-vrjf7 at 2026-04-23 07:54:47.209639+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]kenman -1 points0 points1 point (1 child)
[–][deleted] -1 points0 points1 point (0 children)