Skip to content

isVisible

Mike Byrne edited this page Mar 14, 2023 · 1 revision

description

Introduced 3.1.0

Reports if an element is visible or not - not necessarily within the viewport but generally is the element visible somewhere on the page.

requires

  • nothing

parameters

  • el - required - DOM node to test

returns

  • boolean of visibility status

example usage:

let button = document.querySelector('button');
let buttonVisible = isVisible(button); // true/false