Skip to content

Instantly share code, notes, and snippets.

@liuderchi
Created December 1, 2016 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liuderchi/018b9ab2fdca414d6f2323b6e753f34d to your computer and use it in GitHub Desktop.
Save liuderchi/018b9ab2fdca414d6f2323b6e753f34d to your computer and use it in GitHub Desktop.
Check if element is visible in DOM
// 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