: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
// Handle activating a panel during the animation for another activation
this.prevShow.add( this.prevHide ).stop( true, true );
if ( this.options.animate ) {
this._animate( toShow, toHide, data );
this._toggleComplete( data );
"aria-selected": "false",
// if we're switching panels, remove the old header from the tab order
// if we're opening from collapsed state, remove the previous header from the tab order
// if we're collapsing, then keep the collapsing header in the tab order
if ( toShow.length && toHide.length ) {
} else if ( toShow.length ) {
this.headers.filter( function() {
return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
.attr( "aria-hidden", "false" )
_animate: function( toShow, toHide, data ) {
var total, easing, duration,
boxSizing = toShow.css( "box-sizing" ),
( !toHide.length || ( toShow.index() < toHide.index() ) ),
animate = this.options.animate || {},
options = down && animate.down || animate,
that._toggleComplete( data );
if ( typeof options === "number" ) {
if ( typeof options === "string" ) {
// fall back from options to animation in case of partial down settings
easing = easing || options.easing || animate.easing;
duration = duration || options.duration || animate.duration;
return toShow.animate( this.showProps, duration, easing, complete );
return toHide.animate( this.hideProps, duration, easing, complete );
total = toShow.show().outerHeight();
toHide.animate( this.hideProps, {
step: function( now, fx ) {
fx.now = Math.round( now );
.animate( this.showProps, {
step: function( now, fx ) {
fx.now = Math.round( now );
if ( fx.prop !== "height" ) {
if ( boxSizing === "content-box" ) {
} else if ( that.options.heightStyle !== "content" ) {
fx.now = Math.round( total - toHide.outerHeight() - adjust );
_toggleComplete: function( data ) {
var toHide = data.oldPanel,
this._removeClass( toHide, "ui-accordion-content-active" );
this._removeClass( prev, "ui-accordion-header-active" )
._addClass( prev, "ui-accordion-header-collapsed" );
// Work around for rendering bug in IE (#5421)
toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
this._trigger( "activate", null, data );