diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-07-13 14:42:27 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-07-13 14:42:27 +0000 |
commit | 30952e6b3f80da814e6d7ff633fc1eac0b3c4a13 (patch) | |
tree | 554f65d64b9ac4cb10e9f18217f91199b009f72a /ui/ui.accordion.js | |
parent | d1b099907d1c3425dbae70d573103dca160e98b9 (diff) | |
download | jquery-ui-30952e6b3f80da814e6d7ff633fc1eac0b3c4a13.tar.gz jquery-ui-30952e6b3f80da814e6d7ff633fc1eac0b3c4a13.zip |
accordion: fixed incosistent accordionchange event arguments (http://dev.jquery.com/ticket/3111)
Diffstat (limited to 'ui/ui.accordion.js')
-rw-r--r-- | ui/ui.accordion.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js index 2cf014b8e..4865c317e 100644 --- a/ui/ui.accordion.js +++ b/ui/ui.accordion.js @@ -201,12 +201,11 @@ function clickHandler(event) { // find elements to show and hide var toShow = clicked.next(), toHide = options.active.next(), - //data = [clicked, options.active, toShow, toHide], data = { options: options, - newHeader: clicked, + newHeader: clickedActive && !options.alwaysOpen ? $([]) : clicked, oldHeader: options.active, - newContent: toShow, + newContent: clickedActive && !options.alwaysOpen ? $([]) : toShow, oldContent: toHide }, down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] ); @@ -218,7 +217,7 @@ function clickHandler(event) { }; function findActive(headers, selector) { - return selector != undefined + return selector ? typeof selector == "number" ? headers.filter(":eq(" + selector + ")") : headers.not(headers.not(selector)) |