The Basics of #DOM Manipulation in Vanilla #JavaScript (#No_jQuery)
►https://www.sitepoint.com/dom-manipulation-vanilla-javascript-no-jquery
Whenever we need to perform DOM manipulation, we’re all quick to reach for jQuery. However, the vanilla JavaScript DOM API is actually quite capable in its own right, and since IE < 11 has been officially abandoned, it can now be used without any worries.
In this article, I’ll demonstrate how to accomplish some of the most common DOM manipulation tasks with plain JavaScript, namely:
– querying and modifying the DOM,
– modifying classes and attributes,
– listening to events, and
– animation.