jQuery UI Dialog resize helper

人盡茶涼 提交于 2019-12-11 02:38:32

问题


I have some heavy content inside UI dialog and need to resize it only once, at the end of the resize process. I need the behavior of the resizable when helper option is set for the dialog, so I can use 'stop' event to resize my content. There is same issue described here: jQuery forum

May be someone knows how to solve it.


回答1:


There is indeed an issue with the helper feature of the resizable widget. You can work around it by destroying the widget, then recreating it with the appropriate helper option immediately afterwards:

$("#yourDialog").dialog({
    // options...
}).dialog("widget").resizable("destroy").resizable({
    helper: "ui-resizable-helper"
});

You will find an updated fiddle here.



来源:https://stackoverflow.com/questions/11100870/jquery-ui-dialog-resize-helper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!