1if(document.getElementById("myElmentID").classList.contains("hidden")){
2// I have the 'hidden' class
3}
1
2
3
4
5 const div = document.querySelector('div');
6div.classList.contains('secondary'); // trueCode language: JavaScript (javascript)