Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Collapsible set: Implement _destroy().
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Jul 11, 2013
1 parent b860536 commit 9943c87
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion js/widgets/collapsibleSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ define( [
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

var childCollapsiblesSelector = ":mobile-collapsible, :jqmData(role='collapsible')";
var childCollapsiblesSelector = ":mobile-collapsible, " + $.mobile.collapsible.initSelector;

$.widget( "mobile.collapsibleset", $.extend( {
options: $.extend( {}, $.mobile.collapsible.defaults ),
Expand Down Expand Up @@ -82,6 +82,16 @@ $.widget( "mobile.collapsibleset", $.extend( {
return ret;
},

_destroy: function() {
var el = this.element;

this._removeFirstLastClasses( el.children( childCollapsiblesSelector ) );
el
.removeClass( "ui-collapsible-set " + this._classes )
.children( ":mobile-collapsible" )
.collapsible( "destroy" );
},

_refresh: function( create ) {
var collapsiblesInSet = this.element.children( childCollapsiblesSelector );

Expand Down

0 comments on commit 9943c87

Please sign in to comment.