News for hackers. Stuff that matters.
Re:You Don't Need JQuery by bshimmin on Tuesday December 16, 2014 @02:46PM (#8758946)
Sure, the native APIs are slowly catching up, and classList is definitely a useful one.

You'd better hope that there actually is an element with an ID of "foo", though, otherwise your example will throw an exception. The last time I pointed this out here, there was some disagreement as to whether jQuery's behaviour is actually desirable. I think it is, but I'm probably biased from writing too much jQuery over the years.

There are no comments on this comment yet.