I have a set of radio buttons, all in style with jQuery UI .button() .
I want to change their condition. However, when I do this programmatically on a container change event with:
$("#myradio [value=1]").attr("checked", false); $("#myradio [value=2]").attr("checked", true);
The values ββare changed correctly, but the user interface style still shows an unverified radio button with a verified style, and the verified one still looks unverified.
I looked through the jQuery UI documentation on the button() method for radio buttons, but there is nothing about how to change state and update the user interface style.
In short, the problem is that calling the code is $("selector").button("disable"); does not change the active state of the button - the basic switch is checked correctly, but the active state of the user interface does not change. So, I get a greyed out button that looks like it is still checked and the real selected button is not showing.
Decision
$("selector").button("enable").button("refresh");
jquery jquery-ui radio-button
Antony Carthy Sep 21 '10 at 9:48 2010-09-21 09:48
source share