jquery.parallax-scroll icon indicating copy to clipboard operation
jquery.parallax-scroll copied to clipboard

Disable for mobile

Open mdrick opened this issue 9 years ago • 3 comments

Hi,

I would like to know if it's possible to disable the parallax for mobile/tablet device ?

Thank you in advance

mdrick avatar Aug 10 '16 11:08 mdrick

+1

BrettGregson avatar Aug 17 '16 12:08 BrettGregson

There's no problem to disable the plugin for mobile without updating the plugin. You just have to init the plugin only for desktop, with libraires as modernizr (Modernizr.mq(mq)) or user-agent sniffing. An example :

    var isMobile; // mobile detection function
    if (!isMobile) {
        ParallaxScroll.init();
    }

philippebarbosa avatar Aug 17 '16 12:08 philippebarbosa

merci Phil :p

Le mer. 17 août 2016 à 14:53, Philippe Barbosa [email protected] a écrit :

There's no problem to disable the plugin for mobile without updating the plugin. You just have to init the plugin only for desktop, with libraires as modernizr (Modernizr.mq(mq)) or user-agent sniffing. An example :

var isMobile; // mobile detection function
if (!isMobile) {
    ParallaxScroll.init();
}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alumbo/jquery.parallax-scroll/issues/7#issuecomment-240401793, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPRJm9mNXt3odROjWHySbLb3xyr0faDks5qgwRjgaJpZM4JhCdu .

alumbo avatar Aug 17 '16 12:08 alumbo