r2471 - Accordion: Gracefully falling back to a linear animation for any non-existant animation s...

r2471 - Accordion: Gracefully falling back to a linear animation for any non-existant animation s...


Author: scott.gonzalez
Date: Fri Apr 17 16:05:37 2009
New Revision: 2471
Modified:
trunk/ui/ui.accordion.js
Log:
Accordion: Gracefully falling back to a linear animation for any
non-existant animation specified for the animated option. Fixes #4392 -
Accordion: option animated true causes JavaScript error.
Modified: trunk/ui/ui.accordion.js
==============================================================================
--- trunk/ui/ui.accordion.js    (original)
+++ trunk/ui/ui.accordion.js    Fri Apr 17 16:05:37 2009
@@ -335,6 +335,9 @@
                duration = o.duration,
                easing = o.animated;
+            if (easing && !$.ui.accordion.animations[easing] && !$.easing[easing]) {
+                easing = 'slide';
+            }
            if (!animations[easing]) {
                animations[easing] = function(options) {
                    this.slide(options, {