Z
Z
zipo22016-02-14 01:17:52
JavaScript
zipo2, 2016-02-14 01:17:52

How to make page scroll smoothly like in Mozilla Firefox?

I really like scrolling in mozilla, especially when there are parallax scrolling elements on the site - they look awesome!
In general, I tried to make a script that changes the scrolling of other browsers and that this scrolling was similar to scrolling mozilla.
Here is the code for this script, maybe it will be useful for someone:

if(!(navigator.userAgent.toLowerCase().indexOf('firefox') > -1))
{
  $(document).bind( 'mousewheel', function (e){ 
    var nt = $(document.body).scrollTop()-(e.originalEvent.wheelDeltaY); 
    e.preventDefault(); 
    nt  = e.originalEvent.wheelDeltaY;
    $('html,body').stop(true, false).animate( { 
      scrollTop : '+='+(-nt) 
    } ,50 ,'linear');
  });
}

But unfortunately the scrolling turned out not quite the way you want (not the same as in mozilla).
Maybe someone did a similar script or knows a good plugin - I will be very grateful)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zooks, 2016-02-14
@zooks

It is better not to try to manipulate the scrollbar, because. this is the main control.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question