Provide simple JS DOM class manipulation.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
src
LICENSE
README.md

README.md

CLS JS

JS helper functions for DOM class manipulation.

About

CLS JS includes simplified object methods to allow for simple DOM class manipulation.

  • cls.hasClass( elem, 'class-name' ) => boolean check
  • cls.addClass( elem, 'class-name' ) => add class(es)
  • cls.removeClass( elem, 'class-name' ) => remove class(es)
  • cls.toggleClass( elem, 'class-name' ) => toggle class(es)