更改四方形对话框的大小
我正在使用 Boxy jQuery 插件 (Boxy 插件),并且我正在尝试更改框的大小。我已经尝试过,但没有成功:
var Dialog = new Boxy("<div style='left-margin:40px;'><p><b>Event Name:</b> " + FoundType.Name + "</p><p><b>Event Type:</b> " + FoundCategory.Name + "</p><p><b>Date: </b>" + FoundType.Date.toDateString() + "</p><p><b>Comments:<br /></b>" + FoundType.Details + "</p></div>", { title: "<h><b>Detail</b></h>", modal: true, show: false });
Dialog.resize(400, 400);
Dialog.show();
请问有什么帮助吗?
I'm using the Boxy jQuery Plug-in (Boxy Plug-In) and I'm trying to change the size of the box. I've tried this, but it didn't work:
var Dialog = new Boxy("<div style='left-margin:40px;'><p><b>Event Name:</b> " + FoundType.Name + "</p><p><b>Event Type:</b> " + FoundCategory.Name + "</p><p><b>Date: </b>" + FoundType.Date.toDateString() + "</p><p><b>Comments:<br /></b>" + FoundType.Details + "</p></div>", { title: "<h><b>Detail</b></h>", modal: true, show: false });
Dialog.resize(400, 400);
Dialog.show();
Any help please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为问题在于您无法在 Boxy 窗口显示之前调用它的
resize
。首先show()
它,然后触发resize()
。您还可以将调整大小调用放在 Boxy 构造函数的afterShow
回调中。I think the problem is that you can't call
resize
on a Boxy window before it's displayed.show()
it first, then fire theresize()
. You can also put the resize call inside theafterShow
callback in the Boxy constructor.Boxy不是Facebox模态框的第一次尝试吗? http://chriswanstrath.com/facebox/ 您可能想尝试一下。
Wasn't Boxy the first attampt of Facebox modal box? http://chriswanstrath.com/facebox/ you might want to try that instead.