How to disable mouse scroll trigger in fullpage.js only
Asked Answered
D

3

5

In fullpage.js core functions

How to customize such that when set option autoScrolling: true.

1.only disable mouse scroll behavior trigger in section scrolling control.

2.other keyboard scroll triggers still working. (such as keyup keydown end home etc)

here is the fullpage.js code from git: https://github.com/ajgagnon/fullPage.js/blob/master/jquery.fullPage.js

Explaination: why need to disable mouse scroll sometimes. Because there are scroll sensitivity issues in fullpage.js when "scrollOverflow: true". However, if you totally disabled the "autoScrolling: true" option, by default keyboard trigger still allow to scroll up down left right. ( "keyboardScrolling: true" by default; )

However, I discovered when "scrollOverflow: false" option together with "keyboardScrolling: true", the content will shake instantly the moment you press down the arrow keys. don't know how to fix, so it's my purpose to keep scrollOverflow:true while disable mouse scroll only. then will be no issue. )

Dermal answered 2/12, 2014 at 9:29 Comment(0)
P
31

How about:

$(function()
{
    $('#fullpage').fullpage({
        ...
    });

    $.fn.fullpage.setMouseWheelScrolling(false);
    $.fn.fullpage.setAllowScrolling(false);
});
Pleading answered 2/12, 2014 at 9:53 Comment(0)
M
4

However, if you totally disabled the "autoScrolling: true" option, by default keyboard trigger still allow to scroll up down left right. ( "keyboardScrolling: true" by defa

Not anymore since fullPage.js 2.4.9. autoScrolling:false will disable the auto scroll with keyboard as well.

Mcbrayer answered 3/12, 2014 at 15:6 Comment(0)
R
2

Alvaro, to disable keyboard you should use: keyboardScrolling: false

Reject answered 9/11, 2015 at 19:44 Comment(2)
That option probably didn't exist when the question was asked. In any case, I was clarifying part of his comments.Mcbrayer
Funny answer - telling the owner how to use his plugin :DFrame

© 2022 - 2024 — McMap. All rights reserved.