Following example is with jquery but you can doit with plain javascript aswell.
To disable a scroll in a webpage:
$('body').css('height', window.innerHeight+'px');
$('body').css('overflow', 'hidden');
To enable it again:
$('body').css('height', 'inherit');
$('body').css('overflow', 'none');
To disable a scroll in a webpage:
$('body').css('height', window.innerHeight+'px');
$('body').css('overflow', 'hidden');
To enable it again:
$('body').css('height', 'inherit');
$('body').css('overflow', 'none');
Comments