I would like to know how I can maintain the scroll position when I open a jQuery dialog.
Here is the code I'm using to open my dialog:
<a class="link" onclick="openmyDialog();" href="#">Open a dialog</a>
And the function :
function openmyDialog()
{
$("#dialog").dialog('destroy');
$("#dialog").html("msg");
$("#dialog").dialog(
{
buttons:
{
"Yes": function()
{
$(this).dialog("close");
}
},
resizable: false,
draggable: true,
modal: true,
title: 'Error'
});
return false;
}