check if div with class already exist within code example
Example: jquery check if a class exists
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
}