I\'m using the scrollTo jQuery plugin and would like to know if it is somehow possible to temporarily disable scrolling on the window element through Javascript? The reason
I'm using showModalDialog, for showing secondary page as modal dialog.
to hide main window scrollbars:
document.body.style.overflow = "hidden";
and when closing modal dialog, showing main window scrollbars:
document.body.style.overflow = "scroll";
to access elements in main window from dialog:
parent.document.getElementById('dialog-close').click();
just for anybody searching about showModalDialog:(after line 29 of original code)
document.getElementById('dialog-body').contentWindow.dialogArguments = arg;
document.body.style.overflow = "hidden";//****
document.getElementById('dialog-close').addEventListener('click', function(e) {
e.preventDefault();
document.body.style.overflow = "scroll";//****
dialog.close();
});