JavaScript Periksa apakah elemen memiliki kelas
if(document.getElementById("myElmentID").classList.contains("hidden")){
// I have the 'hidden' class
}
Grepper
if(document.getElementById("myElmentID").classList.contains("hidden")){
// I have the 'hidden' class
}
if (myElement.classList.contains('someClassname')) {
// do something
}
element.classList.contains('class');