at the moment i have the following css
html{
overflow : hidden;
}
how can i change overflow to 'scroll' with javascript?
With jQuery:
$('html').css({overflow: 'scroll'});
Simple JavaScript
document.getElementsByTagName('html')[0].style.overflow = "scroll";
I hope this helps.
For one thing set the body
not html
To change it to scroll
do this:
document.body.style.overflow = "scroll";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With