I'm using the jquery buttonset() on a set of radio buttons (to tart them up). I'd like to be able to set the selected radio button on another user event. I've been looking into this and while I can set the selected radio button, but I cannot also (easily) update the UI to indicate what the selected radio button is.
From what I can tell, I need to call this to set the radio button at index n to be checked
$('input[name="transactionsRadio"]')[n].checked = true;
And then do some convoluted jquery selector calls to remove the ui-state-active from one lable and apply it to the new label.
Is this really the most optimal way to do this ? I had expected an equivalent method to the 'activate' method that is available for the jquery Accordian control.
Any more elegant solution would be appreciated!
$("#yourInput").attr("checked", true).button("refresh");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With