I want to exclude some class use jquery, for exmple $('html').not('.classname'), but it did not work? what's wrong?
Your current syntax is trying to select a
html tag that doesn't have the given class.
You probably won't have a class on your
What you want might be
This selects all the elements except the one's with that given class.
Alternatively you could use
which would not be recommendable performance-wise, since it would select all elements first, only then removing the ones not having that
This selects all the elements (including head, body etc) except the one's with that given class.
This is not a efficient way to select elements.
It will be better if you be more specific in your selection like select all
div elements with out this className.
Or more specifically within a main div