Deteksi Jika suatu elemen memiliki kelas jqurey
$("#EL_ID").hasClass("CLASS_NAME");
Poseidon
$("#EL_ID").hasClass("CLASS_NAME");
if ($(".mydivclass")[0]){
// Do something if class exists
} else {
// Do something if class does not exist
}