Opened 14 years ago
Closed 14 years ago
#4392 closed bug (fixed)
Accordion: option animated true causes JavaScript error
Reported by: | rdworth | Owned by: | Scott González |
---|---|---|---|
Priority: | critical | Milestone: | 1.8 |
Component: | ui.accordion | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The accordion option 'animated' is documented as supporting boolean data type. animated: false works, but animated: true does not.
Expected animated: true enables animation with 'slide' (the documented default animation)
Actual animated: true causes a JavaScript error when a header is clicked.
jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")] is not a function file:jquery-1.3.2.js Line 4139
Change History (5)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Looking into the error
this.options.easing is equal to a Boolean value of true when jQuery.easing[] is looking for a value of linear or swing.
Getting the exisiting code to run
If we change the example that rdworth posted to
$("#accordion").accordion({ animated: "swing" });
or
$("#accordion").accordion({ animated: "linear" });
it runs fine.
Possible Solution
If we still want to use a Boolean value the code around line 329-331 of ui.accordian.js [1.7.1] needs to be adjusted to something like this:
var animations = $.ui.accordion.animations, duration = o.duration, easing = (typeof o.animated === "boolean")?"linear":o.animated;
"swing" | true |
comment:3 Changed 14 years ago by
This bug here: http://dev.jqueryui.com/ticket/4394 might be the real cause of this issue.
comment:4 Changed 14 years ago by
Owner: | set to scott.gonzalez |
---|---|
Status: | new → assigned |
Visual test: http://jquery-ui.googlecode.com/svn/trunk/tests/visual/accordion/accordion_option_animated_true.html