check doeas html object contains some class code example
Example: javascript check if element has class
if(document.getElementById("myElmentID").classList.contains("hidden")){
// I have the 'hidden' class
}
if(document.getElementById("myElmentID").classList.contains("hidden")){
// I have the 'hidden' class
}