Disable fullpage.js on mobile (touch) devices

patrickzdb

I'm using fullpage.js and the slimscroll.js plugin, which is required to allow scrolling in a section which has content that exceeds the height it's container section.

I've noticed that the experience is quite bad on touch devices. Whereas normally you can swipe, release and watch the page still scroll, on a slimscroll div as soon as your finger leaves the touch area, the scrolling stops.

So what I'd like to do is disable fullpage.js on mobiles and tablets, but still enable it on desktops. I checked out fullPage.js's issues and documentation but I couldn't find a simple way of doing this.

Could anyone help me out?

Thanks a lot

Alvaro

Just don't initialize fullpage on touch devices. You will have to deal with the mobile/touch devices detection. Just search a bit on google or even here to find different alternatives.

It should look like this:

var isPhoneDevice = [ WHATEVER FUNCTION YOU WANT TO USE ]

//if it is not a phone device...
if(!isPhoneDevice){
    //initializing fullpage...
    $.fn.fullpage();
}

UPDATE

At the moment fullpage.js provides another alternative. Using the responsiveWidth and responsiveHeight options. This way fullpage.js will act as a normal website under the given values (in px).

This can also be combined with the class fp-auto-height-responsive in order to prevent fullPage.js to set the sections height on responsive and let you total control over them.

More in the docs.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Disable fullpage.js on mobile (touch) devices

From Dev

Disable touch swipe on fullpage.js

From Dev

Disable touch panning for body of site on mobile devices

From Dev

Disable touch panning for body of site on mobile devices

From Dev

Click vs touch on mobile devices in JS

From Dev

How to disable some js scripts on mobile devices

From Dev

disable autoplay on mobile devices

From Dev

Disable scroll on mobile devices

From Dev

Fullpage.js and mobile devices: How to enable section / slide switch if content overflow must be enabled?

From Dev

How to disable links for touch devices

From Dev

How to disable links for touch devices

From Java

Changing :hover to touch/click for mobile devices

From Dev

Add CSS change on touch start for mobile devices

From Dev

Disable scrolling of behind layers on touch devices

From Dev

Disable zooming for touch devices in bootstrap framework

From Dev

Disable Hover Effect only on Touch Devices

From Dev

Disable scrolling of behind layers on touch devices

From Dev

Disable jQuery scrollbar plugin on touch devices?

From Dev

FullPage JS: how to "disable" FullPage on smartphones and display sections as a long page?

From Dev

fullPage.js tap not working on mobile

From Dev

Disable zoom on mobile devices for fixed viewport size

From Dev

How to disable this part of my javascript on mobile devices?

From Dev

How to disable this part of my javascript on mobile devices?

From Dev

How to disable image map on a slider on mobile devices

From Dev

Google maps iframe disable scrolling touch on mobile

From Dev

FullPage.js touch scrolling over fixed element

From Dev

how to disable keyboard popup on mobile devices on mobile webpage input?

From Dev

:hover on ios mobile devices turns into double-touch instead of hover

From Dev

change :hover to click/tap function on mobile/touch devices not working

Related Related

  1. 1

    Disable fullpage.js on mobile (touch) devices

  2. 2

    Disable touch swipe on fullpage.js

  3. 3

    Disable touch panning for body of site on mobile devices

  4. 4

    Disable touch panning for body of site on mobile devices

  5. 5

    Click vs touch on mobile devices in JS

  6. 6

    How to disable some js scripts on mobile devices

  7. 7

    disable autoplay on mobile devices

  8. 8

    Disable scroll on mobile devices

  9. 9

    Fullpage.js and mobile devices: How to enable section / slide switch if content overflow must be enabled?

  10. 10

    How to disable links for touch devices

  11. 11

    How to disable links for touch devices

  12. 12

    Changing :hover to touch/click for mobile devices

  13. 13

    Add CSS change on touch start for mobile devices

  14. 14

    Disable scrolling of behind layers on touch devices

  15. 15

    Disable zooming for touch devices in bootstrap framework

  16. 16

    Disable Hover Effect only on Touch Devices

  17. 17

    Disable scrolling of behind layers on touch devices

  18. 18

    Disable jQuery scrollbar plugin on touch devices?

  19. 19

    FullPage JS: how to "disable" FullPage on smartphones and display sections as a long page?

  20. 20

    fullPage.js tap not working on mobile

  21. 21

    Disable zoom on mobile devices for fixed viewport size

  22. 22

    How to disable this part of my javascript on mobile devices?

  23. 23

    How to disable this part of my javascript on mobile devices?

  24. 24

    How to disable image map on a slider on mobile devices

  25. 25

    Google maps iframe disable scrolling touch on mobile

  26. 26

    FullPage.js touch scrolling over fixed element

  27. 27

    how to disable keyboard popup on mobile devices on mobile webpage input?

  28. 28

    :hover on ios mobile devices turns into double-touch instead of hover

  29. 29

    change :hover to click/tap function on mobile/touch devices not working

HotTag

Archive