Skip to content

Instantly share code, notes, and snippets.

@fael
Created September 12, 2011 21:07
Show Gist options
  • Save fael/1212432 to your computer and use it in GitHub Desktop.
Save fael/1212432 to your computer and use it in GitHub Desktop.
Force scroll when jQuery Dialog is open
function enableScrollbar(event, ui) {
window.setTimeout(function() {
$(document)
.unbind('mousedown.dialog-overlay')
.unbind('mouseup.dialog-overlay');
}, 100);
}
//when calling a dialog, override the open method
$(...).dialog({
modal: true,
open: enableScrollbar
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment