How can I set the positioning of jquery dialog box to be applied to all dialog calls instead of stating position:
{my: "center", at: "center", of: foo}
in every instance?
I can't find any OOTB solution, but you can wrap your dialog creation in a function:
function myDialog(selector, target) {
return $(selector).dialog("widget").position({
my: 'center',
at: 'center',
of: target
});
}
And then create it with myDialog("#dialog", foo)
. You might also want to make this be a simple jQuery plugin to avoid global function declaration.