2 ms·
The second function is broken for an element with multiple classes. DOM fail.
by shanemhansen 12y ago
The second function is broken for an element with multiple classes. DOM fail.
- voyou 12y agoThat makes the site a pretty good illustration of one of the reasons why, although you don't have to use jQuery, you maybe should. With jQuery you benefit from years of development and testing, which your own code probably hasn't undergone.
- spoiler 12y agoThis is why one writes unit tests, though. Although, I do occasionally use jQuery, I'm more comfortable and productive when not using it. Also, if I shamelessly take a peek at jQuery's source now-and-then to see how they implement certain features so I can make a helper for it.