Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

properjs-scrollcontroller

0.2.2 • Public • Published

ScrollController

Scroll handling controller using request animation frame.

Installation

npm install properjs-scrollcontroller --save-dev

Usage

var ScrollController = require( "properjs-scrollcontroller" ),
    // Default is Window
    scroller = new ScrollController();
 
// Bind event
scroller.on( "scroll", function () {
    // Handle event here
});
 
// You can pass an element
scroller = new ScrollController( element );

Events

  • scroll
  • scrolldown
  • scrollup
  • scrollmax
  • scrollmin

Methods

  • on()
  • getScrollY()
  • getScrollMax()
  • isScrollMax()
  • isScrollMin()

install

npm i properjs-scrollcontroller

Downloadsweekly downloads

13

version

0.2.2

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar