aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-07-20 16:13:44 -0400
committerScott González <scott.gonzalez@gmail.com>2010-07-20 16:13:44 -0400
commitf99068bb4ff7fc0ceec154ac8e3b63e088246047 (patch)
tree30005c8b67bffac89c999cfd4b2965c3ab6d8f97
parente85615fc6b1d636f4bcea3abd3a6091f937858b8 (diff)
downloadjquery-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.js2
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)) {