SyntaxFix
Write A Post
Hire A Developer
Questions
I don't know why, but the accepted answer didn't work for me. Instead this worked:
if ($(this).hasClass("test") !== false) {}