mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
accordion: simplified find-header-element code, thanks Ariel
This commit is contained in:
parent
b876be002d
commit
dd584fbe95
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user