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:


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
Line 4139

Change History (5)

comment:2 Changed 14 years ago by epascarello

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

    animated: "swing"


    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;
with this change animated can have the following values: "linear"
"swing" true

comment:3 Changed 14 years ago by epascarello

This bug here: might be the real cause of this issue.

comment:4 Changed 14 years ago by Scott González

Owner: set to scott.gonzalez
Status: newassigned

comment:5 Changed 14 years ago by Scott González

Resolution: fixed
Status: assignedclosed

Fixed in r2471.

Note: See TracTickets for help on using tickets.