Reputation: 257
My problem is that I am not able to refresh radio buttons. I have three radio buttons and when i click on any button first time, it works fine. But, when i click on another button then it triggers the event but does not update the buttons visually (previous one remains checked visually). here is my code
<fieldset data-role="controlgroup">
<legend>Increment:</legend>
<input type="radio" name="radiob" id="radio1" value="1" class="radio_button"/>
<label for="radio1">1</label>
<input type="radio" name="radiob" id="radio2" value="2" class="radio_button" />
<label for="radio2">2</label>
<input type="radio" name="radiob" id="radio3" value="3" class="radio_button" />
<label for="radio3">3</label>
</fieldset>
Here is the jquery code
$(".radio_button").change(checkIncrement);
function checkIncrement(){
$('input:[name=radiob]:radio:checked').checkbox("refresh");
rd=$('input:[name=radiob]:radio:checked').val();
inc="i"+rd;
var ch=1;
var sl=parseInt(rd)+parseInt(ch);
$("#slider").attr("min", sl).slider("refresh");
}
Upvotes: 2
Views: 8207
Reputation: 4377
in Jquery mobile radio button like this:
$(".iscfieldset input[type='radio']").checkboxradio().checkboxradio("refresh");
try this working fine for me
Upvotes: 2
Reputation: 13620
The method name you are using in the first line of checkIncrement()
is wrong.It should be checkboxradio
$('input:[name=radiob]:radio:checked').checkboxradio("refresh")
A demo here - http://jsfiddle.net/kvhFc/
Upvotes: 4