'pagepiling.js setAllowScrolling not working on mobile device
I'm using pagepiling.js for my website. It has 5 sections for the user to scroll through and then the rest of the website under it all.
In order to scroll through the content under the pagepiling, I'm using the afterLoad callback to remove the overflow style and to enable/disable scrolling:
$('#pagepiling').pagepiling({
scrollingSpeed: 700,
navigation: false,
afterLoad: function (anchorLink, index) {
if (index == $('#pagepiling .section').length) {
$('html, body').css('overflowY', 'auto');
$.fn.pagepiling.setAllowScrolling(false);
}
$(document).scroll(function () {
if ($(window).scrollTop() == 0) {
$('html, body').css('overflow', 'hidden');
$.fn.pagepiling.setAllowScrolling(true);
}
});
},
});
This works great in desktop to allow the user to scroll the page after the last pagepiling slide but has no effect on a mobile device.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
