mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Accordion: Removed animated option. Fixes #8601 - Accordion: Remove animated option.
This commit is contained in:
parent
054b208a99
commit
8d35c03dfd
@ -1,8 +1,7 @@
|
||||
TestHelpers.commonWidgetTests( "accordion", {
|
||||
defaults: {
|
||||
active: 0,
|
||||
animate: null,
|
||||
animated: "slide",
|
||||
animate: {},
|
||||
collapsible: false,
|
||||
disabled: false,
|
||||
event: "click",
|
||||
|
34
ui/jquery.ui.accordion.js
vendored
34
ui/jquery.ui.accordion.js
vendored
@ -576,40 +576,6 @@ if ( $.uiBackCompat !== false ) {
|
||||
return ret;
|
||||
};
|
||||
}( jQuery, jQuery.ui.accordion.prototype ) );
|
||||
|
||||
// animated option
|
||||
// NOTE: this only provides support for "slide", "bounceslide", and easings
|
||||
// not the full $.ui.accordion.animations API
|
||||
(function( $, prototype ) {
|
||||
$.extend( prototype.options, {
|
||||
animate: null,
|
||||
animated: "slide"
|
||||
});
|
||||
|
||||
var _create = prototype._create;
|
||||
prototype._create = function() {
|
||||
var options = this.options;
|
||||
if ( options.animate === null ) {
|
||||
if ( !options.animated ) {
|
||||
options.animate = false;
|
||||
} else if ( options.animated === "slide" ) {
|
||||
options.animate = 300;
|
||||
} else if ( options.animated === "bounceslide" ) {
|
||||
options.animate = {
|
||||
duration: 200,
|
||||
down: {
|
||||
easing: "easeOutBounce",
|
||||
duration: 1000
|
||||
}
|
||||
};
|
||||
} else {
|
||||
options.animate = options.animated;
|
||||
}
|
||||
}
|
||||
|
||||
_create.call( this );
|
||||
};
|
||||
}( jQuery, jQuery.ui.accordion.prototype ) );
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
|
Loading…
Reference in New Issue
Block a user