jQuery UI Dialog调整大小帮助器 [英] jQuery UI Dialog resize helper

查看:257
本文介绍了jQuery UI Dialog调整大小帮助器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在UI对话框中有一些繁重的内容,需要在调整大小过程结束时只调整一次。当为对话框设置了helper选项时,我需要resizable的行为,所以我可以使用'stop'事件来调整我的内容。
这里描述了同样的问题:
jQuery论坛

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.

推荐答案

可调整大小的小部件的辅助功能确实存在问题。您可以通过销毁小部件来解决它,然后立即使用适当的帮助程序选项重新创建它:

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.

这篇关于jQuery UI Dialog调整大小帮助器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆