aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.accordion.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2008-06-21 16:16:59 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2008-06-21 16:16:59 +0000
commit2e3b8eac77fe95b583a945a022bced62c478408f (patch)
tree8c8ca400373c69649da85d17862feb29e2400c15 /ui/ui.accordion.js
parent9196c2022c428d5aa2b75e2558f981458356e9da (diff)
downloadjquery-ui-2e3b8eac77fe95b583a945a022bced62c478408f.tar.gz
jquery-ui-2e3b8eac77fe95b583a945a022bced62c478408f.zip
accordion: added test for headers with descendants; replaced while-loop to find header-parent with call to parents
Diffstat (limited to 'ui/ui.accordion.js')
-rw-r--r--ui/ui.accordion.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js
index 00a660c0b..c7828cd9d 100644
--- a/ui/ui.accordion.js
+++ b/ui/ui.accordion.js
@@ -180,9 +180,7 @@ function clickHandler(event) {
// due to the event delegation model, we have to check if one
// of the parent elements is our actual header, and find that
if ( clicked.parents(options.header).length ) {
- while ( !clicked.is(options.header) ) {
- clicked = clicked.parent();
- }
+ clicked = clicked.parents(options.header + ":first");
}
var clickedActive = clicked[0] == options.active[0];