jquery if this has class not working code example Example: has not class jquery if (!$(this).hasClass("test")) {