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

前端 未结 7 1905
遇见更好的自我
遇见更好的自我 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:41

    The answer is to set the

    autoResize:true 
    

    property when creating the dialog. In order for this to work you cannot set any height for the dialog. So if you set a fixed height in pixels for the dialog in its creator method or via any style the autoResize property will not work.

提交回复
热议问题