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