How to check if an element does NOT have a specific class? October 4, 2022 by Tarik if (!$(this).hasClass("test")) {