Make JQuery UI Dialog automatically grow or shrink to fit its contents

前端 未结 7 1912
遇见更好的自我
遇见更好的自我 2020-12-04 09:28

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

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 09:47

    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.

提交回复
热议问题