diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-07-20 16:13:44 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-07-20 16:13:44 -0400 |
commit | f99068bb4ff7fc0ceec154ac8e3b63e088246047 (patch) | |
tree | 30005c8b67bffac89c999cfd4b2965c3ab6d8f97 | |
parent | e85615fc6b1d636f4bcea3abd3a6091f937858b8 (diff) | |
download | jquery-ui-f99068bb4ff7fc0ceec154ac8e3b63e088246047.tar.gz jquery-ui-f99068bb4ff7fc0ceec154ac8e3b63e088246047.zip |
Accordion: Use this.headers instead of parsing the DOM to find headers when determining which panel is active. Fixes #5841 - Accordion active property inaccurate if nested accordion is present.
-rw-r--r-- | ui/jquery.ui.accordion.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 1d13e9566..f21b63cce 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -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)) { |