if classname jquery code example
Example: if element has class jquery
if ($(".mydivclass")[0]){
// Do something if class exists
} else {
// Do something if class does not exist
}
if ($(".mydivclass")[0]){
// Do something if class exists
} else {
// Do something if class does not exist
}