diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-09-30 17:06:06 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-09-30 17:06:22 -0400 |
commit | 1e395ecf08c8c9d24b1b676692124f9e2c2602c1 (patch) | |
tree | 04ee726c9008dab7298fc54c8eef5a1154f4b196 | |
parent | e8ba367a58995b191706e5682eacba534cd25697 (diff) | |
download | jquery-ui-1e395ecf08c8c9d24b1b676692124f9e2c2602c1.tar.gz jquery-ui-1e395ecf08c8c9d24b1b676692124f9e2c2602c1.zip |
Accordion: Fixed nested accordions.
-rw-r--r-- | ui/jquery.ui.accordion.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index c976e3e69..580009d33 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -13,8 +13,6 @@ */ (function( $, undefined ) { -var lastToggle = {}; - // TODO: use ui-accordion-header-active class and fix styling $.widget( "ui.accordion", { version: "@VERSION", @@ -39,6 +37,7 @@ $.widget( "ui.accordion", { var self = this, options = self.options; + self.lastToggle = {}; self.element.addClass( "ui-accordion ui-widget ui-helper-reset" ); self.headers = self.element.find( options.header ) @@ -378,10 +377,11 @@ $.widget( "ui.accordion", { } animations[ animation ]({ + widget: self, toShow: toShow, toHide: toHide, - prevShow: lastToggle.toShow, - prevHide: lastToggle.toHide, + prevShow: self.lastToggle.toShow, + prevHide: self.lastToggle.toHide, complete: complete, down: toShow.length && ( !toHide.length || ( toShow.index() < toHide.index() ) ) }, additional ); @@ -450,7 +450,7 @@ $.extend( $.ui.accordion, { duration: 300 }, options, additions ); - lastToggle = options; + options.widget.lastToggle = options; if ( !options.toHide.size() ) { originalWidth = options.toShow[0].style.width; |