views:

1146

answers:

1

Hi - 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!

Thanks, Kevin.

+1  A: 

http://jqueryui.com/demos/button/#method-refresh

ondesertverge
Thanks - should have found that myself! I got hooked up on trying to find a .set method...
Kevin