]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion - Make sure we have an element before trying to modify the className. Fixes...
authorScott González <scott.gonzalez@gmail.com>
Thu, 13 Jan 2011 21:36:14 +0000 (16:36 -0500)
committerScott González <scott.gonzalez@gmail.com>
Thu, 13 Jan 2011 21:36:14 +0000 (16:36 -0500)
ui/jquery.ui.accordion.js

index 24ef019e158ab5cbf6159a5ffc9997ebcb877060..5fa4b1aeedf77a8585986dc97ece8fd41bfc5d35 100644 (file)
@@ -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 );
        }