更改Jquery UI手风琴的动画速度 [英] Change animation speed of Jquery UI Accordion
问题描述
我正在使用Jquery UI手风琴,但是我在文档中找不到任何有关如何更改动画速度的信息.我发现人们建议使用选项动画:'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
});
动画:"慢"是不正确的,因此无法正常工作.有什么想法吗?
The "animate:"slow" is not correct and therefore not working. Any ideas?
推荐答案
尽管已经记录了功能请求并计划在1.9里程碑中实现,但目前尚无法直接实现此功能. 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手风琴的动画速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!