Skip to content

Instantly share code, notes, and snippets.

@yumyo
Last active December 26, 2018 14:11
Show Gist options
  • Save yumyo/9af2ca1be0b7b473eb5606bc571e2f1f to your computer and use it in GitHub Desktop.
Save yumyo/9af2ca1be0b7b473eb5606bc571e2f1f to your computer and use it in GitHub Desktop.
homeSwiper.on('onReachEnd', function(){
setTimeout(function(){
homeSwiper.lockSwipes();
homeSwiper.disableMousewheelControl();
window.scrollBy(0, 1);
}, 800);
});
document.onscroll=function(){
if (document.body.scrollTop <= 0){
setTimeout(function(){
homeSwiper.enableMousewheelControl();
homeSwiper.unlockSwipes();
}, 500);
}
};
noSwipingClass
string
'swiper-no-swiping'
'stop-swiping'
CSS class of html element that will be used to prevent swiping when "noSwiping" parameter is set to true.
http://idangero.us/swiper/api/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment