Javascript – Disable browsers vertical and horizontal scrollbars

javascriptjquery

Is it possible to disable the browsers vertical and horizontal scrollbars using jQuery or javascript?

Best Solution

In case you need possibility to hide and show scrollbars dynamically you could use

$("body").css("overflow", "hidden");

and

$("body").css("overflow", "auto");

somewhere in your code.