繁体   English   中英

如何停止停止传播到达文档

[英]How can I stop stoppropagation reaching the document

如果这样做:

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

然后无法再滚动正文,但是,如果我在滚动#scrollarea stopPropagation,则会重新启用文档的滚动...

当起泡到文档时,如何停止stopPropagation?

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM