2014-02-07 34 views
0

如果做到这一点:如何停止stoppropagation到达文档

$('body').bind('touchmove',function(e){ 
    e.preventDefault(); 
    }); 
$('#scrollarea').bind('touchmove',function(e){ 
    e.stopPropagation(); 
    }); 

然后身体可以nolonger滚动,但是,如果我滚动#scrollarea stopPropagation重新启用文档的滚动...

当文档起泡时,如何停止停止传播?

+0

我不明白'气泡上升'。 –

回答

0

您是否尝试添加冒泡的第三个参数?

$('#scrollarea').bind('touchmove',function(e){ 
    e.stopPropagation(); 
}, true); 
+0

不起作用。 #scrollarea不可卷动 –