I've got a 3 button (radio) buttonset which is essentially the main navigation of an iPhone app. When navigating using the buttonset, the buttons correctly show and hide their selected state, however, other links in the app can change the "page" in the app and thus require the buttonset to change to reflect the current state.
Per the jQuery UI docs, it seemed that the way to do what I want is to manipulate the DOM as needs be, ie check and uncheck the radio buttons in question and then call the "refresh" method on the button group, which I'm doing like this:
The buttongroup is great at managing its own state, ie when I click one of the modal buttons it puts itself in the selected (checked) state and puts the other buttons in the unselected state. However, there are other actions in the app that can change its state and the button bar needs to react and hilite (select, check, etc.) the correct button. It appears from the button documentation that I could do something like this:
$('#radio3).button("option", checked, [false]);
$('#radio2).button("option", checked, [true]);
or
$('#radio3).button({ checked: false });
$('#radio2).button({ checked: true });
However neither approach seems to work. Suggestions, please?