【问题标题】:Specify options for jquery UI Dialog animations?指定 jquery UI 对话框动画的选项?
【发布时间】:2011-07-31 03:03:36
【问题描述】:

我知道当你调用对话框时你可以使用

.dialog({
  show: 'fade', 
  hide: 'fade'
});

但是是否支持选项?

例如

.dialog({
  show: {effect: 'fade', speed: 1000}, 
  hide: {effect: 'fade', speed: 500}
});

甚至

.dialog({
  show: {effect: 'fade', {speed: 1000}}, 
  hide: {effect: 'fade', {speed: 500}}
});

我正在使用1.8.14

【问题讨论】:

    标签: javascript jquery jquery-ui jquery-ui-dialog effects


    【解决方案1】:

    尝试duration 而不是speed。像这样……

    .dialog({
      show: {effect: 'fade', duration: 1000}, 
      hide: {effect: 'fade', duration: 500}
    });
    

    您还可以包括easingqueue 等选项,甚至是complete 回调函数。看起来.animate() 函数接受的大多数选项都在showhide 属性中被接受。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-30
      • 2011-10-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多