using:
$('body,html').css("overflow","hidden");
the scrollbar in the page was able to hide completely. But i want the scroll bar just to be DISABLED during some AJAX event. Later using:
$('body,html').css("overflow","visible");
I had to enable scrolling again for full page in my AJAX success.
(Like removing scrollbox from scorllbar and disabling scrolling arrows) yet still scrollbar appears in th window. This would prevent from change of page width in meantime.
Is there any possibilitioes to do so? Any help is appriciated. Thanks in advance.
Click on Start > Ease of Access. Scroll down on the left and Check or uncheck Automatically hide scroll bars in Windows.
Make sure overflow is set to "scroll" not "auto." With that said, in OS X Lion, overflow set to "scroll" behaves more like auto in that scrollbars will still only show when being used.
you can do: position: fixed; on the element you don't want to be scrollable.
OK here is the Working Code:
body
{
position: fixed;
overflow-y: scroll;
width: 100%;
}
I used it and its the same what you want.
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