diff options
-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]; |