Answers for "hwo to check if there is a class in an elemetn using jquery"

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 "hwo to check if there is a class in an elemetn using jquery"

Browse Popular Code Answers by Language