Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery check if a class exists

if ($(".mydivclass")[0]){
    // Do something if class exists
} else {
    // Do something if class does not exist
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #check #class #exists
ADD COMMENT
Topic
Name
9+4 =