Feature/add vanilla js support

Shouldn't this be in a debounce function, so the toggelState doesn't get executed every ms?