Answers for "detect if an element has a class jQurey"

CSS
6

detect if an element has a class jQurey

$("#EL_ID").hasClass("CLASS_NAME");
Posted by: Guest on May-14-2020
1

jquery check if a class exists

if ($(".mydivclass")[0]){
    // Do something if class exists
} else {
    // Do something if class does not exist
}
Posted by: Guest on May-06-2020

Code answers related to "detect if an element has a class jQurey"

Browse Popular Code Answers by Language