Set content-theme to collapsible in a set only if it's not already set

This commit is contained in:
gseguin 2011-09-22 10:28:56 -07:00
parent 1692c0f378
commit fb06381176

View file

@ -75,7 +75,12 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
var set = collapsibleParent.children( ":jqmData(role='collapsible')" );
set.jqmData( "content-theme", collapsibleParent.jqmData( "content-theme" ) );
set.each(function() {
var $this = $( this );
if ( !$this.jqmData( "content-theme" ) ) {
$this.jqmData( "content-theme", collapsibleParent.jqmData( "content-theme" ) );
}
});
set.first()
.find( "a:eq(0)" )