Reduce the speed of a accordion in jquery UI
accordion, jquery, jquery-ui
Solution
For the speed, use animate:
if ($('#sidebar ul').length) {
$("#sidebar ul").accordion({
event: "mouseover",
active: 1,
collapsible: false,
autoHeight: false,
animate: 2000 // miliseconds
});
}
From the jquery ui docs:
Animate
If and how to animate changing panels.
Multiple types supported:
- Boolean: A value of false will disable animations.
- Number: Duration in milliseconds with default easing.
- String: Name of easing to use with default duration.
- Object: Animation settings with easing and duration properties.
- Can also contain a down property with any of the above options.
- "Down" animations occur when the panel being activated has a lower index than the currently active panel.
Problem
I have two problems with this code: First I would like to reduce the speed of the effect. Second as you would for the effect to operate to close a tab and then there will be the following newly tab ``` if ($('#sidebar ul').length) { $("#sidebar ul").accordion({ event: "mouseover", active: 1, collapsible: false, autoHeight: false }); } ``` Example URL: http://jsfiddle.net/8pKMh/