Detect If An Element Is Visible – nowUseeMe

Category: Javascript | February 8, 2018
Views Total:998 views
Official Page:Go to website
Last Update:February 8, 2018


Detect If An Element Is Visible – nowUseeMe


nowUseeMe is a Vanilla JavaScript solution to detect if an element is visible within the browser viewport. Also supports window scroll events.

How to use it:

Link to the necessary JavaScript file:

<script src="js/nowuseeme.js"></script>

Add the CSS ID ‘here’ to any element you want to detect the visibility on page load or on page scroll.

<h2 id="here">Element to track</h2>

That’s it. It will return True if the element is visible and return False if the element is invisible.

You Might Be Interested In:

Leave a Reply