I cannot for the life of me get Jquery mobile to properly refresh a control group after appending to it dynamically. I have tried .controlgroup('refresh', true); .trigger('pagecreate'); and everything else I have found on here.
Please view my jsfiddle demo of the problem. If you add a radio button it does not format properly in jquery mobile.
The difference between this and Dynamic controlgroup and checkboxes unstyled is that mine appends to the control group after an action takes place not when the page is loaded.
http://jsfiddle.net/msenmyud/7/
$( "#addCard" ).click(function() {
$('<input name="card1" value="ground" type="radio" class="creditCardChoice" id="card4"><label for="card3">Visa Ending in 3333</label>')
.appendTo("#CCSelection");
$("input[type='radio']").checkboxradio();
$('input:radio').checkboxradio('refresh');
$("[data-role=controlgroup]").enhanceWithin().controlgroup("refresh");
$('#CCSelection').controlgroup('refresh', true);
$("#CCSelectionForm").trigger('create');
$("#saved-credit-cards-page").trigger('pagecreate');
});