slimscroll
Version:
slimscroll is a small commonjs module with no library dependencies (sans jquery) that transforms any div into a scrollable area with a nice scrollbar - similar to the one Facebook and Google started using in their products recently. slimScroll doesn't occ
36 lines (30 loc) • 1.02 kB
JavaScript
;
// console.log("example test wepps!!s");
var Slimscroll = require('../../../lib/slimscroll');
function slimscrollEventHandler(e,pos){
document.querySelector('#testDivOut').innerHTML +="Reached " + pos + ", ";
}
function slimscrollingEventHandler(e,pos){
document.querySelector('#testDivOut2').innerHTML +="Scroll: " + pos + "px, ";
}
window.onload =function(){
window.sscroll3 = new Slimscroll({
alwaysVisible: true,
height: '100px',
idSelector: '.groupofdivs'
});
window.sscroll3.init();
// window.sscroll1 = new Slimscroll({
// alwaysVisible: true,
// height: '100px',
// idSelector: '#testDiv'
// });
// window.sscroll1.init();
// window.sscroll2 = new Slimscroll({
// height: '200px',
// idSelector: '#testDiv2'
// });
// window.sscroll2.init();
// document.querySelector('#testDiv').addEventListener('slimscroll',slimscrollEventHandler);
// document.querySelector('#testDiv2').addEventListener('slimscrolling',slimscrollingEventHandler);
};