JS Periksa apakah elemen tersembunyi
if (elem.getAttribute("hidden") != null){
//code if elem is hidden
}
Teacrumble
if (elem.getAttribute("hidden") != null){
//code if elem is hidden
}