【问题标题】:jQuery How to disable mobile scrolling then enable itjQuery如何禁用移动滚动然后启用它
【发布时间】:2014-03-28 02:26:57
【问题描述】:

我可以像这样禁用它

$('#div1').click(function(){
$(document).bind('touchmove', false);
});

但是当我点击另一个div时我想再次启用它,我尝试了:

$('#div2').click(function(){
$(document).bind('touchmove', true);
});

我做错了吗?

我从来没有用过这个。

【问题讨论】:

    标签: javascript jquery jquery-mobile mobile


    【解决方案1】:
     $('#div2').click(function(){
         $(document).unbind('touchmove');
     });
    

    【讨论】:

    • 谢谢,我知道这很简单!学习
    猜你喜欢
    • 2012-06-03
    • 2013-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多