how to autocenter jquery ui dialog whenb resizing browser?

Posted by Jorre on Stack Overflow See other posts from Stack Overflow or by Jorre
Published on 2010-06-17T08:44:30Z Indexed on 2010/06/17 8:53 UTC
Read the original article Hit count: 333

Filed under:
|
|

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 annoying.

You can test it out on: http://jqueryui.com/demos/dialog/

Click on the "modal dialog" example and resize your browser.

I'd love to be able to let dialogs autocenter when the browser resizes. Can this be done in an efficient way for all my dialogs in my app?

Thanks a lot!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui