showonscroll

0.2.0 • Public • Published

ShowOnScroll

A client side module using jQuery to initially hide selected elements and then reveal them when scrolled over. Multiple different elements can be passed. Using CSS transitions that can be modified from the module's settings. Use with Browserify for client side.

Installation

  npm install showonscroll --save

Usage

  var showonscroll = require('showonscroll'),
      showscroll = new showonscroll;
      //set the transition options:
      showscroll.transition.delay = '0.5s'; //default is '0'
      showscroll.transition.duration = '1s'; //default is '0.5s'
      showscroll.transition.timing = 'ease'; //default is 'linear'
 
  var elems = $('.elems'),
      other = $('.something-else'),
      third = $('.third-elem');
 
  showscroll.run(elems, other, third);

Tests

Tests are handled in the browser - please go to test/index.html.

Release History

  • 0.2.0 Updated description
  • 0.1.0 Initial release

Package Sidebar

Install

npm i showonscroll

Weekly Downloads

2

Version

0.2.0

License

none

Last publish

Collaborators

  • lesz3k