2 ms·
This is good example of how browser APIs have gotten better: // Edge 12 document.querySelector('.class').remove(); // Edge 17 document.querySelector('.class')
by realityking 6y ago
This is good example of how browser APIs have gotten better:
// Edge 12
document.querySelector('.class').remove();
// Edge 17
document.querySelector('.class').after(...);
Where jQuery shines - but also hides a lot of complexity- is when operating on an array of elements, e.g. if you want to remove all elements with a certain class.