Answers for "if document.hidden"

0

js check if element hidden

if (elem.getAttribute("hidden") != null){
  //code if elem is hidden
}
Posted by: Guest on December-05-2020
0

check if element is visible or hidden in dom

// Where el is the DOM element you'd like to test for visibility
function isHidden(el) {
    var style = window.getComputedStyle(el);
    return (style.display === 'none')
}
Posted by: Guest on February-25-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language