mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
Accordion - Make sure we have an element before trying to modify the className. Fixes #6856 - Accordion: Opening a panel after all panels have been collapsed causes an error.
This commit is contained in:
parent
13ca4847f1
commit
a7aa65d1fc
2
ui/jquery.ui.accordion.js
vendored
2
ui/jquery.ui.accordion.js
vendored
@ -504,7 +504,9 @@ $.widget( "ui.accordion", {
|
|||||||
// other classes are removed before the animation; this one needs to stay until completed
|
// other classes are removed before the animation; this one needs to stay until completed
|
||||||
this.toHide.removeClass( "ui-accordion-content-active" );
|
this.toHide.removeClass( "ui-accordion-content-active" );
|
||||||
// Work around for rendering bug in IE (#5421)
|
// Work around for rendering bug in IE (#5421)
|
||||||
|
if ( this.toHide.length ) {
|
||||||
this.toHide.parent()[0].className = this.toHide.parent()[0].className;
|
this.toHide.parent()[0].className = this.toHide.parent()[0].className;
|
||||||
|
}
|
||||||
|
|
||||||
this._trigger( "change", null, this.data );
|
this._trigger( "change", null, this.data );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user