Is it possible to prevent scroll event in jQuery?
I've tried this code, but it didn't work.
$('*').scroll(function(event){
event.stopPropagation();
event.preventDefault();
return false;
})
Is it possible to prevent scroll event in jQuery?
I've tried this code, but it didn't work.
$('*').scroll(function(event){
event.stopPropagation();
event.preventDefault();
return false;
})
You can disable scrolling within certain element areas using the following:
$("element,element2").bind("touchmove",function(e){
e.preventDefault();
});
Just set the body
CSS to disable the scroll.
body {
overflow: hidden;
}
well.. i worked with wrong event. touchmove was exactly what i'm looked for. so
$('body').bind('touchmove', function(e){
e.preventDefault();
});