I have a jQuery Dialog box and Am loading the content using Ajax.
The Dialog is initially in the center of the page. The problem , here is , Since its a dynamic con
The default dialog is absolutely relative positioned.
The dialog may expand on giving auto height, but when the page is scrolled , the dialog is reposition itself.
The only way to do this is, apply these styles to the dialog
Position the dialog in the Window by
position : ['center',
Fix the position by using css style
.fixed-dialog { position:"fixed" }
Add this class to the dialog
dialogClass : 'fixed-dialog'
So, the dialog would look like
$('#dialog-div').dialog({
position : ['center',10],
dialogClass: "fixed-dialog"
});