I am using hasClass()
to verify in my if statement if an element has a given class.
How can I check in my if statement if an element hasn't a given class? Thank you in advance for your replies.
Why not simply:
if (!el.hasClass('foo')) { // code }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With