views:

42

answers:

0

I have a jquery ui dialog popup, and then inside are buttons to show/hide content. If one button is clicked, when the content expands... I simply call:

var position = $(selector).dialog( "option", "position" );
$(selector).dialog( "option", "position", 'center' );

To recenter the dialog on the screen.

The problem or question I have is I want it to animate when the dialog expands or contracts while staying centered within the browser. I have seen other overlay boxes do this, but I'm trying to get it to work with jquery ui. TIA!