mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
accordion: remove selectedClass and generated spans on destroy
This commit is contained in:
parent
994e4e2f26
commit
2c89a2d2c9
@ -78,11 +78,15 @@ $.widget("ui.accordion", {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
destroy: function() {
|
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", "");
|
this.options.headers.next().css("display", "");
|
||||||
if ( this.options.fillSpace || this.options.autoHeight ) {
|
if ( this.options.fillSpace || this.options.autoHeight ) {
|
||||||
this.options.headers.next().css("height", "");
|
this.options.headers.next().css("height", "");
|
||||||
}
|
}
|
||||||
$.removeData(this.element[0], "accordion");
|
$.removeData(this.element[0], "accordion");
|
||||||
|
|
||||||
this.element.removeClass("ui-accordion").unbind(".accordion");
|
this.element.removeClass("ui-accordion").unbind(".accordion");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user