How to check if an element does NOT have a specific class?

if (!$(this).hasClass("test")) {

Leave a Comment