Not class selector in jQuery
Is there a simple selector expression to not select elements with a specific class?
I just want to get the first three divs and tried
But this receives all as the last div contains more than first-bar. Is there a way to use a placeholder in such an expression? Something like that
$(div[class^=”first-“][class!=”first-bar*”]) // doesn’t seem to work
Any other selectors that may help?
You need the
or, alternatively, the
You can use the
:not filter selector: