accordion: fixed calling activate with -1 and alwaysOpen: false not properly removing classes (fixes #3785)

This commit is contained in:
Paul Bakaus 2009-01-19 15:08:52 +00:00
parent e67bf62eea
commit 14e32a2b9f

View File

@ -202,6 +202,8 @@ $.widget("ui.accordion", {
// called only when using activate(false) to close all parts programmatically
if (!event.target && !o.alwaysOpen) {
this.active.parent().toggleClass(o.selectedClass);
this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
.find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
var toHide = this.active.next(),
data = {
options: o,