I'm trying to inject radio buttons into my jQuery-Mobile page and it seems to go well minus one detail. I can only ever select the radio buttons once. Once they have been checked, no amount of clicking will uncheck them. The code for injection is below, any ideas on what I'm doing wrong?
function load_states() {
for(var i in level1_states) {
var str = " ";
str += "<label for=\" "+i+" \">"+i+"</label>";
str += "<input type=\"radio\" name=\" "+i+" \" id=\" "+i+" \" value=\""+i+" \" />";
$(str).appendTo("#level1");
}
$("input[type='radio']").prop("type", "radio").checkboxradio();
$("#level1").controlgroup("create");
}