I have a JQuery UI dialog popup that displays a form. By selecting certain options on the form new options will appear in the form causing it to grow taller. This can lead
var w = $('#dialogText').text().length; $("#dialog").dialog('option', 'width', (w * 10));
did what i needed it to do for resizing the width of the dialog.