diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-10-05 14:05:31 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-10-05 14:05:31 +0000 |
commit | 2c89a2d2c91f831c2a62012b73af4e157e65ca37 (patch) | |
tree | e727fbba5aefbf19ae15ee125d8fdb6bc6a88402 /ui | |
parent | 994e4e2f265968c202baf0e94cbf946896df6a7e (diff) | |
download | jquery-ui-2c89a2d2c91f831c2a62012b73af4e157e65ca37.tar.gz jquery-ui-2c89a2d2c91f831c2a62012b73af4e157e65ca37.zip |
accordion: remove selectedClass and generated spans on destroy
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.accordion.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js index 7b47ee3de..aaafdf3b7 100644 --- a/ui/ui.accordion.js +++ b/ui/ui.accordion.js @@ -78,11 +78,15 @@ $.widget("ui.accordion", { }); }, destroy: function() { + this.options.headers.parent().andSelf().removeClass(this.options.selectedClass); + this.options.headers.prev(".ui-accordion-left").remove(); + this.options.headers.children(".ui-accordion-right").remove(); this.options.headers.next().css("display", ""); if ( this.options.fillSpace || this.options.autoHeight ) { this.options.headers.next().css("height", ""); } $.removeData(this.element[0], "accordion"); + this.element.removeClass("ui-accordion").unbind(".accordion"); } }); |