Permalink
Browse files

Collapsible set: Implement _destroy().

  • Loading branch information...
gabrielschulhof committed Jul 10, 2013
1 parent b860536 commit 9943c873056cfc6d52777c9a02ae27289a389f1b
Showing with 11 additions and 1 deletion.
  1. +11 −1 js/widgets/collapsibleSet.js
@@ -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 ),
@@ -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 );

0 comments on commit 9943c87

Please sign in to comment.