🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

on-scrolled-to.js is a jQuery plugin that detects how much (from 0 to 1) your element is visible within the viewport and triggers a callback function when you scroll down the page.

Viewport scroll-animation

Documentation

jquery-on-scrolled-to

jQuery plugin to execute code when specific element becomes visible.

I.e. when it reaches viewport, visitor scrolls to it or window resized so that element becomes visible.

Demo

https://wowpress.host/plugins/jquery-on-scrolled-to/

Install

Available via npm

npm install jquery-on-scrolled-to

Usage

Basic example

$('.my-div').onScrolledTo(0.5, function() {    this.html('fired'); });

Where 0.5 is the portion of .my-div that has become visible before firing callback. Event is executed only once.

License

MIT


You May Also Like