i am using jquery mobile horizontal control group radio buttons.
How do i set the first radio button active. The following are the two radio buttons,
<input type="radio" name="rating" id="radio-mini-1" value="Above Average" /><label for="radio-mini-1">Above<br /> Average</label>
Average
I tried using the following code,
$('input:radio[name="rating"]').filter('[value="Above Average"]').attr('checked', true);
but no luck. What’s wrong?
When you use jQueryMobile, the html structure changes, so you have to do some tricks, try this:
if it didn’t work, try this: