Regarding mouse wheel scrolling speed adjustment

Asked 2 years ago, Updated 2 years ago, 47 views

In order to slow down the speed of scrolling, I set the following:
It was done during FF and IE, but if you look at it on GC, it will rattle when you scroll below.
Are there any mistakes in the description?

This is the current situation.
http://footmarkdays.web.fc2.com/test2/

<script>
var scrollly=150;
varscrolllySpeed=150;
variasing='easeOutQuart';

$(function(){
    // $('html').mousewheel(function(event,mov){
    $('html').wheel(function(event,mov){

        vartrg=$($.browser.safari?'body':'html');    
        scrollly=(mov>0)?trg.scrollTop()-scrolllySpeed:trg.scrollTop()+scrolllySpeed;

        $('html, body')
        .stop()
        .animate({scrollTop:scrollly},1000,easing);

        return false;
    });

        });
</script>

https://greasyfork.org/scripts/36987-jquery-mousewheel-3-1-13/code/jQuery%20Mousewheel%203113.js?version=240834

javascript jquery

2022-09-30 13:51

1 Answers

I think it's because of what's on this page.

https://www.chromestatus.com/features/6662647093133312

The event listener is being treated as passive, so
I think it's because event processing interruptions are ignored (including return false).


2022-09-30 13:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.