Answers for "if div has not element with class jquery"

2

if a class exists jquery

if ($(".mydivclass").length){
    // Do something if class exists
} else {
    // Do something if class does not exist
}
Posted by: Guest on November-28-2020
1

has not class jquery

if (!$(this).hasClass("test")) {
Posted by: Guest on March-01-2021

Code answers related to "if div has not element with class jquery"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language