When you use jquery UI dialog, all works well, except for one thing. When the browser is resized, the dialog just stays in it\'s initial position which can be really annoyin
Alternatively to Ellesedil's answer,
That solution did not work for me straight away, So I did the following which is also dynamical but shortened version:
$( window ).resize(function() {
$(".ui-dialog-content:visible").each(function () {
$( this ).dialog("option","position",$(this).dialog("option","position"));
});
});
+1 for Ellesedil though
EDIT:
Much shorter version which works great for single dialogs:
$(window).resize(function(){
$(".ui-dialog-content").dialog("option","position","center");
});
It is not necessary for .each() to be used perhaps if you have some unique dialogs which you dont want to touch.