0
我的项目只是水平滚动。这意味着X.如何启用和禁用页面滚动
#landscape
是整个容器。
起初,我禁用了滚动#landscape
。
之后,当我在点击.close-reveal-modal
一个div
褪色。
在这种div
我仍然不能滚动$('#landscape')
。 之后,我想在关闭此.close-reveal-modal
后启用$('#landscape')
的滚动。
我累了把$('#landscape').off
这意味着启用它。但它不适合我。
$('#landscape').on('scroll touchmove mousewheel', function(e){ // on off means enable and disable
e.preventDefault();
e.stopPropagation();
return false;
})
$('.close-reveal-modal').click(function(){
setTimeout(function(){
$('#second_load').fadeIn(300);
}, 1000);
});
$('#second_load').click(function(){
$('#second_load').fadeOut(300);
$('#landscape').off('scroll touchmove mousewheel', function(e){ // on off means enable and disable
e.preventDefault();
e.stopPropagation();
return false;
})
});
我想你的代码。我不确定我是否正确应用。但它对我不起作用。 –