[jQuery] UI dialog resize (width & height settings)

[jQuery] UI dialog resize (width & height settings)


I had problem when try to reuse div element with ui.dialog().
If I set the width & height the first time it works; but if I call it
from second function with different width & height it won't apply the
new setting.
Also if I manually resize the dialog when it appear after close and
reopen it use the new size (resized manually) not the one I specified
in the code.
So my question is very simple is it possible to resize the dialog
before it show up?