scrollme
Animate CSS properties on scroll
Requires:
- Nodejs
- Gulp
Installation
$ npm install scrollme --save
AMD
;
CommonJS
var scrollMe = ;
Global namespace
var scrollMe = windowScrollMe;
Live demo
TODO:
- Write proper documentation
Testing:
- $ npm test
Code:
//store scroll positionvar scrollY = 0; var scrollMe = ; //get total scroll areavar totalScrollAreaHeight = height; //get total visible areavar clientHeight = innerHeight; //init the libscrollMe; //add listener to update scrollY position;
//add animation to elementscrollMe;
//add animation with percentage string valuesscrollMe;
//add rendering loop { //updates scroll value scrollMe; ;}; ;