From 82c041b23d82c053e848d1e30f76de859011d39c Mon Sep 17 00:00:00 2001 From: scottjehl Date: Tue, 5 Oct 2010 18:34:41 -0400 Subject: [PATCH] controlgroup only gets innerwrapped if there's a controlgroup label (legend element) --- js/jQuery.mobile.controlGroup.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/jQuery.mobile.controlGroup.js b/js/jQuery.mobile.controlGroup.js index 08a91e01..2ea09c9c 100644 --- a/js/jQuery.mobile.controlGroup.js +++ b/js/jQuery.mobile.controlGroup.js @@ -16,10 +16,9 @@ $.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 if( groupheading.length ){ + $(this).wrapInner('
'); $('
'+ groupheading.html() +'
').insertBefore( $(this).children(0) ); groupheading.remove(); }