jquery-on-scrolled-to

1.0.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i jquery-on-scrolled-to

      Weekly Downloads

      0

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      5.34 kB

      Total Files

      7

      Last publish

      Collaborators

      • wowpress-host