更改 Jquery UI Accordion 的动画速度 [英] Change animation speed of Jquery UI Accordion

查看:22
本文介绍了更改 Jquery UI Accordion 的动画速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Jquery UI Accordion,但我在文档中找不到任何关于如何更改动画速度的内容.我发现人们建议使用选项animated: 'bounceslide'",但无法找到动画的不同可用选项.

I'm using the Jquery UI Accordion, and I haven't found anywhere in the documentation on how to change the speed of the animation. I've found people suggest using option "animated: 'bounceslide'" but haven't been able to find what the different available options are for animated.

我现在的js如下

    $( "#accordion" ).accordion({
        event: "mouseover",
        animate:"slow",
        active:false
    });

"animate:"slow" 不正确,因此不起作用.有任何想法吗?

The "animate:"slow" is not correct and therefore not working. Any ideas?

推荐答案

虽然功能请求已被记录并计划在 1.9 里程碑实现:http://bugs.jqueryui.com/ticket/3772.您可以等待该版本发布,也可以尝试此处描述的子类化方法:http://bugs.jqueryui.com/ticket/3533.

This is currently not directly possible, although a feature request has been logged and is scheduled to implemented by the 1.9 milestone: http://bugs.jqueryui.com/ticket/3772. You can either wait for that release, or try the subclassing method described here: http://bugs.jqueryui.com/ticket/3533.

这归结为:

$.extend($.ui.accordion.animations, {
  fastslide: function(options) {
    $.ui.accordion.animations.slide(options, { duration: 100 }); }
  });

这篇关于更改 Jquery UI Accordion 的动画速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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