jquery radio button not refreshing -
this quick question i'm sure i'm sure i'm having brain fart here.
goal. on load select 1 of 2 radio buttons.
problem. visually not show.
i've tried sepreatly , @ same time 2 lines of code.
$("#ssexfemale").attr("checked", true);
$("#ssexfemale").prop("checked", true);
the first line changes
<input type="radio" name="ssex" id="ssexfemale" value="0">
into
<input type="radio" name="ssex" id="ssexfemale" value="0" checked="checked">
but radio button still not checked visually. if manually changed file html starts sec line see radio button selected. did research , found saying use.
$('#ssexfemale').buttonset("refresh");
but generates next error.
uncaught error: cannot phone call methods on buttonset prior initialization; attempted phone call method 'refresh'
this must simple i'm missing. help appreciated. thanks.
jquery radio-button
No comments:
Post a Comment