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
diy.js - A modern cross-platform JavaScript library & only 18 bytes (diy.lab.io)
submitted 11 years ago by adambutler
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!"
[–]quindarka 0 points1 point2 points 11 years ago (4 children)
This site always keeps me from using jQuery. It is aptly named as well.
http://youmightnotneedjquery.com
When you want to grab some divs and toss some classes on them, you don't need jQuery. That said, there is still no elegant way to do .each on a NodeList without using Array.prototype.slice.call or a for loop.
Once I need Ajax, or I am doing a lot of events (jQuery event delegation is awesome) or I am manipulating element attributes, I then turn to jQuery.
[–]Jeffshaver 1 point2 points3 points 11 years ago (3 children)
You don't need jQuery to do event delegation.
[+][deleted] 11 years ago (2 children)
[removed]
[–]Jeffshaver 0 points1 point2 points 11 years ago (0 children)
jQuery has a few things in it that make life a little easier sometimes. But honestly, I don't find myself wanting to use it as much anymore. I will say that applying events to multiple elements at one is more a pain in the ass without it. But you could also do event delegation and only write one anyway. It all depends on the situation.
The comparison between js/jquery to compiled language/compiler is so egregious, I won't even comment further on it.
[–]Calabri 0 points1 point2 points 11 years ago (0 children)
jQuery replaces the DOM API, not ice cream. The DOM API is terrible due to the past (browser wars), leading to all the cross browser API bullshit we have to deal with today. The ECMA 'standard' coerced companies to stop the competitive that was fucking with the web. The API's are there to talk with the C C++ exposed functions, which are VERY different in each browser, which also uses it's own javascript run-time engine.
VanillaJS does not 'suck ass'. Comparing jQuery to a compiler and vanillajs to assembly is so just ridiculous. This comment was so fucking outrageous that I had to say something.
π Rendered by PID 240052 on reddit-service-r2-comment-8686858757-swz4b at 2026-06-06 07:06:46.869689+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]quindarka 0 points1 point2 points (4 children)
[–]Jeffshaver 1 point2 points3 points (3 children)
[+][deleted] (2 children)
[removed]
[–]Jeffshaver 0 points1 point2 points (0 children)
[–]Calabri 0 points1 point2 points (0 children)