9 ms·
It's the main reason I dislike jQuery. It's hard to debug. document.getElementById('non-existent').classList; // error $('#non-existent').addClass('ya
by zsoltgyongyosi 13y ago
It's the main reason I dislike jQuery. It's hard to debug.
document.getElementById('non-existent').classList; // error
$('#non-existent').addClass('yay'); // hidden bug
I prefer the explicit solution.