chec is div is visible plain js no jquery code example
Example: js check if element hidden
if (elem.getAttribute("hidden") != null){
//code if elem is hidden
}
if (elem.getAttribute("hidden") != null){
//code if elem is hidden
}