Close dialog box and maintain scroll position
When I close my dialog box it scrolls to the top.
How can I close it and maintain the scroll position?
- $("#dialog-container").dialog({
- title: "MyTitle",
- width: 'auto',
- height: 'auto',
- modal: true,
- open: function () {
- jQuery('.ui-widget-overlay').bind('click', function () {
- jQuery('#dialog-container').dialog('close');
- });
- }
- });//End dialog
For some reason and occasionally it keeps the scroll position.
I'm trying to figuring out why this sometime works, but I don't seem to find a reason.