On one of my web pages I'm currently checking whether a css class isn't being used, like so:
if (!$('*').hasClass("my-special-class")) {
The above works but it's checking every element on the page. In fact, I only need to check within a particular div (id = 'mydiv') and its child elements, but am not quite sure what sort of selector to use, and would welcome a suggestion?