Update CssClassToggler.js

Optimizations to avoid redundant dom calls and array.length evaluations