If you don’t want that the user can scroll your website (to disable the bump-effect on iPhones and iPads for example), then you can use this code snippet which prevents the scrolling on mobile/touch devices:
<script type="text/javascript"> function preventDefaultScrolling(event){ event.preventDefault(); } document.ontouchstart = document.ontouchmove = document.ontouchend = preventDefaultScrolling; </script> |
For re-enabling the default scrolling behavior you can do the following:
<script type="text/javascript"> function restoreDefaultScrolling(event){ return true; } document.ontouchstart = document.ontouchmove = document.ontouchend = restoreDefaultScrolling; </script> |