Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Create a smooth Scrolling Effect?

I saw a nice scrolling effect on this website http://www.agileinfoways.com/ and would like to know how to implement. I have never seen it before and I do not know what it is even called. The scrolling is almost mimics a UIScrollView on the iOS platform. Any advice on how to create this would be helpful. Thanks

like image 862
Michael Avatar asked Oct 31 '22 20:10

Michael


1 Answers

This site using NiceScroll plugin for JQuery

Plugin GitHub page - https://github.com/inuyaksa/jquery.nicescroll

Initialization code from site, what you gave:

if (jQuery().niceScroll) {
    $("html").niceScroll({
        scrollspeed: 70, 
        mousescrollstep: 38, 
        cursorwidth: 15, 
        cursorborder: 0, 
        cursorcolor: '#464646', 
        cursorborderradius: 0, 
        autohidemode: false, 
        horizrailenabled: false
    });
}
like image 151
Виктор Новиков Avatar answered Nov 09 '22 10:11

Виктор Новиков