Permalink
Browse files

Collapsible: Account for the possibility that the collapsibleset widg…

…et is not defined.
  • Loading branch information...
gabrielschulhof committed Apr 19, 2013
1 parent 04a449a commit 3f6a18890bd1334c232789071b16f42944c5c14d
Showing with 2 additions and 1 deletion.
  1. +2 −1 js/widgets/collapsible.js
@@ -28,10 +28,11 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
_create: function() {
var $el = this.element,
o = this.options,
collapsiblesetWidgetSelector = ( $.mobile.collapsibleset ? ", :mobile-collapsibleset" : "" ),
collapsible = $el.addClass( "ui-collapsible" ),
collapsibleHeading = $el.children( o.heading ).first(),
collapsibleContent = collapsible.wrapInner( "<div class='ui-collapsible-content'></div>" ).children( ".ui-collapsible-content" ),
collapsibleSet = $el.closest( ":jqmData(role='collapsible-set'), :mobile-collapsibleset" ).addClass( "ui-collapsible-set" ),
collapsibleSet = $el.closest( ":jqmData(role='collapsible-set')" + collapsiblesetWidgetSelector ).addClass( "ui-collapsible-set" ),
collapsibleClasses = "";
// Replace collapsibleHeading if it's a legend

0 comments on commit 3f6a188

Please sign in to comment.