I got some radio controls that in JQuery Mobile 1.0.1 (stable) were working pretty good, but when I test the new RC (1.1.0), I can’t get those work.
Here’s how I defined the radio group
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Mostra elementi già letti</legend>
<input type="radio" name="radio-view" id="radioMostraElementiLettiSi" value="si"/>
<label for="radioMostraElementiLettiSi">Si</label>
<input type="radio" name="radio-view" id="radioMostraElementiLettiNo" value="no"/>
<label for="radioMostraElementiLettiNo">No</label>
</fieldset>
And here’s the code I use to check it
if($('#radioMostraElementiLettiSi').attr("checked"))
var showReadElements = "si";
else
var showReadElements = "no";
The problem is that in stable version, when the radio I listen to is checked, it correctly enters in the IF condition, in the new version it’s always undefined.
Moreover, when I try and listen for the change event to fire… it just never fire, while in version 1.0.1 it triggers correctly…
Here’s the code I use for the change event
$('#radioMostraElementiLettiSi').live('change',function(){
alert("Trigger!");
});
Is it me doing something wrong or they just changed something?
The bug was fixed, use latest version until new RC version released.
http://jquerymobile.com/blog/2011/04/16/latest/