Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

jquery check if class exists

// if class exist the expresion will return true and the code from if statement will execute
if ($(".mydivclass")){
    // 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
4+8 =