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.

This commit is contained in:
Scott González 2009-04-17 23:05:37 +00:00
parent 8fac95cea3
commit 6ca335f94c

View File

@ -335,6 +335,9 @@ $.widget("ui.accordion", {
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, {