jQuery UI:对话框显示/隐藏带有选项的效果 [英] jQuery UI: dialog show/hide effects with options

查看:101
本文介绍了jQuery UI:对话框显示/隐藏带有选项的效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在jQuery UI中为对话框的显示和隐藏选项指定选项.

Is it possible to specify options for the show and hide options of a Dialog box in jQuery UI.

例如,代替:

$('#dialog').dialog({
  show: 'fade'
});

类似的东西:

$('#dialog').dialog({
  show: {effect: 'fade', speed: 1000}
});

(上面的代码当然不起作用.)

(The code above does not, of course, work.)

我真正想使用的是效果内部的"complete"方法或回调函数,因此在效果完成后我可以选择一些文本.

What I'm really trying to use is the "complete" method inside of the effect, or a callback function, so I can select some text after the effect is done.

如果有人知道,谢谢.

推荐答案

您可以使用:

$("#dialog").dialog({
        autoOpen: false,
        hide: 'fold',
        show: 'blind'
});

并设置两个不同的效果以隐藏和显示.

And set two different effects to hide and show.

您不能使用完成"方法.至少没有实际发布.该功能是计划用于1.9版

You can't use the "complete" method. At the least not with the actual release. That feature is planned for release 1.9

希望有帮助

这篇关于jQuery UI:对话框显示/隐藏带有选项的效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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