diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-01-13 16:36:14 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-01-13 16:36:14 -0500 |
commit | 93d01208ebeaaabd7da2800d894a7d4e88e33db7 (patch) | |
tree | ebe20d56dfb56f81e5c3ea840443f2bcc8c2bbae /ui | |
parent | 599e1434c591abcc3780f8ec7ac493e28504ef8c (diff) | |
download | jquery-ui-93d01208ebeaaabd7da2800d894a7d4e88e33db7.tar.gz jquery-ui-93d01208ebeaaabd7da2800d894a7d4e88e33db7.zip |
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.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.accordion.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 24ef019e1..5fa4b1aee 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -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 ); } |