Possible Duplicate:
jQuery get all divs which do not have class attribute
I need to select all elements that have no class defined. How do I do that with JQuery?
Possible Duplicate:
jQuery get all divs which do not have class attribute
I need to select all elements that have no class defined. How do I do that with JQuery?
$(':not([class])')
However, note this will also select html, body, head
if they don't have a class.
This query will select all elements and then filter those that do not have the class attribute: $('*').not('[class]')