A small script that manages your pages state via document.documentElement.classlist
. 😎
Used configuration:
var states = new States('coolPrefix-');
“I am a <p>
element and I switch states using the data-state
attribute (I have no callback).”
Current document.documentElement.classList
: