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.
An older version is hosted at public CDNs, allowing you to use this already small file at nearly zero size overhead. Use one of these URLs:
- //cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js
- //cdn.jsdelivr.net/classlist/2014.01.31/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.