JavaScript vérifie si l'élément a une classe
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
}
const div = document.querySelector('div');
div.classList.contains('secondary'); // trueCode language: JavaScript (javascript)