Created
March 1, 2013 17:03
-
-
Save aziraphale/5066105 to your computer and use it in GitHub Desktop.
Disable touch events on touchscreen devices when using JoelBesada's ScrollPath plugin (https://github.com/JoelBesada/scrollpath)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Disable panning around the page on touchscreen devices (as this is totally incompatible with ScrollPath) | |
$(document).one('touchstart', function(){ | |
$(document).on('touchmove', function(ev){ | |
ev.preventDefault(); | |
}); | |
// Also hide the scrollbar | |
$('.sp-scroll-bar').hide(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment