Created
December 1, 2016 01:03
-
-
Save liuderchi/018b9ab2fdca414d6f2323b6e753f34d to your computer and use it in GitHub Desktop.
Check if element is visible in DOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/19669786/check-if-element-is-visible-in-dom | |
//Where el is the DOM element you'd like to test for visibility | |
function isHidden(el) { | |
return (el.offsetParent === null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment