classList.js is a cross-browser JavaScript shim that fully implements element.classList
. Refer to the MDN page on element.classList
for more information.
This works in every browser except IE 7 or earlier.
classList.js is available on these public CDN URLs, allowing you to use this already small file at nearly zero size overhead.
- https://cdnjs.cloudflare.com/ajax/libs/classlist/1.2.20171210/classList.min.js
- https://cdn.jsdelivr.net/npm/[email protected]/classList.min.js
If you would like other versions (such as the current one) hosted there, follow the instructions at https://github.com/jsdelivr/jsdelivr and https://github.com/cdnjs/cdnjs to prepare a pull request.