Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

if element has class jquery

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