Mic*_*tes 6 html javascript jquery web-applications ios
我想在webapp中禁用iOS过度滚动但仍然允许滚动主体.
$(document).on('touchmove', function(e) {
e.preventDefault();
});
Run Code Online (Sandbox Code Playgroud)
完全禁用滚动(正如人们所期望的那样).
有办法做我想做的事吗?
我有同样的问题.这应该可以帮到你:
// Disable overscroll / viewport moving on everything but scrollable divs
$('body').on('touchmove', function (e) {
if (!$('.scrollable').has($(e.target)).length) e.preventDefault();
});
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
18209 次 |
最近记录: |