diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-06-22 19:08:35 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-06-22 19:08:35 +0000 |
commit | dd584fbe9527c88e6adb40653224143abb6b4961 (patch) | |
tree | 658fe621669ad7ea2a8733921110dfaf0b436c94 /ui | |
parent | b876be002d23c0e723c9ca10e4be8fb3704cf8b5 (diff) | |
download | jquery-ui-dd584fbe9527c88e6adb40653224143abb6b4961.tar.gz jquery-ui-dd584fbe9527c88e6adb40653224143abb6b4961.zip |
accordion: simplified find-header-element code, thanks Ariel
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.accordion.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js index c7828cd9d..089073a16 100644 --- a/ui/ui.accordion.js +++ b/ui/ui.accordion.js @@ -179,9 +179,8 @@ 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 ) { - clicked = clicked.parents(options.header + ":first"); - } + // otherwise stick with the initial target + clicked = $( clicked.parents(options.header)[0] || clicked ); var clickedActive = clicked[0] == options.active[0]; |