]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Use this.headers instead of parsing the DOM to find headers when determini...
authorScott González <scott.gonzalez@gmail.com>
Tue, 20 Jul 2010 20:13:44 +0000 (16:13 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 20 Jul 2010 20:13:44 +0000 (16:13 -0400)
ui/jquery.ui.accordion.js

index 1d13e9566f11d13fcb5ed8a96945cd7d20cc028b..f21b63cce58143dc70ec265b4d1c55140240f4d4 100644 (file)
@@ -302,7 +302,7 @@ $.widget("ui.accordion", {
                
                // TODO the option is changed, is that correct?
                // TODO if it is correct, shouldn't that happen after determining that the click is valid?
-               o.active = o.collapsible && clickedIsActive ? false : $('.ui-accordion-header', this.element).index(clicked);
+               o.active = o.collapsible && clickedIsActive ? false : this.headers.index(clicked);
 
                // if animations are still active, or the active header is the target, ignore click
                if (this.running || (!o.collapsible && clickedIsActive)) {