From e03d33ac9ecc66bc18aa01fb8a263c88f1afcfb2 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Tue, 5 Oct 2010 17:33:56 -0400 Subject: [PATCH] added inner wrapper for toggling layout in wider resolutions --- js/jQuery.mobile.controlGroup.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/jQuery.mobile.controlGroup.js b/js/jQuery.mobile.controlGroup.js index da6e50f9..ad322f96 100644 --- a/js/jQuery.mobile.controlGroup.js +++ b/js/jQuery.mobile.controlGroup.js @@ -16,9 +16,13 @@ $.fn.controlgroup = function(options){ flCorners = o.direction == 'horizontal' ? ['ui-corner-left', 'ui-corner-right'] : ['ui-corner-top', 'ui-corner-bottom'], type = $(this).find('input:eq(0)').attr('type'); + $(this).wrapInner('
'); + //replace legend with more stylable replacement div - $('
'+ groupheading.html() +'
').insertBefore(groupheading); - groupheading.remove(); + if(groupheading){ + $('
'+ groupheading.html() +'
').insertBefore( $(this).children(0) ); + groupheading.remove(); + } $(this).addClass('ui-corner-all ui-controlgroup ui-controlgroup-'+o.direction);