you would imagine this would be easy to implement, but oh well..
anyway, I have an element to which classes are added or removed based of interaction on the site.
You don't need jQuery to achive this.
var hasNoClass = !document.getElementById("#id").className; if(hasNoClass){ /*...*/ }else{ /*...*/ }
Same approach using jQuery
var hasNoClass = !$("#id").className; if(hasNoClass){ /*...*/ }else{ /*...*/ }