Reputation: 1610
I am using phoneGap and jQuery Mobile. When I use a <div></div>
tag then it works properly but on an iPhone it is auto scroll-able. How do I stop this?
Upvotes: 2
Views: 670
Reputation: 825
if you want to prevent a div to scroll use this:
<div id="container" ontouchmove="touchMove(event);">
content goes here
</div>
and the function touchMove(event)
:
touchMove = function(event) {
event.preventDefault();
}
hope this works
Upvotes: 3