mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04: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:
4
ui/jquery.ui.accordion.js
vendored
4
ui/jquery.ui.accordion.js
vendored
@@ -488,7 +488,9 @@ $.widget( "ui.accordion", {
|
||||
// other classes are removed before the animation; this one needs to stay until completed
|
||||
this.toHide.removeClass( "ui-accordion-content-active" );
|
||||
// Work around for rendering bug in IE (#5421)
|
||||
this.toHide.parent()[0].className = this.toHide.parent()[0].className;
|
||||
if ( this.toHide.length ) {
|
||||
this.toHide.parent()[0].className = this.toHide.parent()[0].className;
|
||||
}
|
||||
|
||||
this._trigger( "change", null, this.data );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user