Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

Add disableMobile and enableMobile public functions #763

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nyroDev
Copy link

@nyroDev nyroDev commented Aug 14, 2015

Following this issue:
#675

I had a case when a mobile menu had to scroll because it was too long.
With skrollr, all event where stopped and it was impossible to scroll in the menu.

With this pull request, we can now disabled all event catching on mobile.

The usage is simple:
When the user open the menu, I call skrollr.disableMobile() and it can now scroll in the menu, and skrollr stay where it is
When the user closes the menu, I call skrollr.enableMobile() and everything work like normal.

I updated the README.md to add these 2 functions documentation.

I didn't updated the minified file, neither the HISTORY.md.

I hope it fits the project.

@timawork
Copy link

timawork commented Apr 13, 2017

Hello, I try it
jQuery('#openmenu').click(function(){
skrollr.disableMobile();
});

but

Uncaught TypeError: skrollr.disableMobile is not a function

@timawork
Copy link

timawork commented Apr 13, 2017

Ups sorry, my fault. All works perfect

@manooog
Copy link

manooog commented Jun 30, 2017

I also get

Uncaught TypeError: skrollr.disableMobile is not a function

how do you fix it ?

@timawork

@timawork
Copy link

timawork commented Jul 13, 2017

This works for me

var s = skrollr.init({
.....
});

jQuery('#openmenu').click(function(){
s.disableMobile();
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants