From fb06381176736a16891f6dd497d027a5af0f6a14 Mon Sep 17 00:00:00 2001 From: gseguin Date: Thu, 22 Sep 2011 10:28:56 -0700 Subject: [PATCH] Set content-theme to collapsible in a set only if it's not already set --- js/jquery.mobile.collapsible.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.collapsible.js b/js/jquery.mobile.collapsible.js index 2a9cef08..dbc9a443 100644 --- a/js/jquery.mobile.collapsible.js +++ b/js/jquery.mobile.collapsible.js @@ -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)" )