My main goal is to disable body scrolling when a custom modal popup (not AJAX control kit) is showing up.
Is it possible to set the body css overflow:hidden
without hiding the scrollbar (vertical in this case) because the page "jumps" to the right the width of the scrollbar. I understand it's possible to set the margin-left
to negative width of the scrollbar, but may there's more "neat" way to accomplish this?
$('body').css({
"overflow": "hidden"
// ???
});
If there's a better way to solve my problem - I'm all ears (and eyes) :)
Thanks in advance