Ticket #7072 (closed bug: notabug)
jQuery-UI : buttonset() : When "checked" status of radio buttons change, their accompanying LABELs do not reflect this change in design.
|Reported by:||shehriyari||Owned by:|
I am posting in step-by-step fashion:
a) In a form, I have radio buttons, two of them, upon which I applied UI's buttonset(): Copy code
They look cool and when I click, they work just fine.
b) However, if I change "checked" status of those radio buttons in any of the following methods: Copy code
- $(".radio").get(0).checked = true;
- $(".radio").get(0).checked = false;
Firebug reports expected values, BUT LABELs do not react to the changes. This is unexpected result and should be fixed. Why? Read further...
c) To overcome the problem above, I trigger LABELs' "click" event instead, like this: Copy code
It works. BUT what if I "disable" those radio buttons? When I do that, LABELs also reflect that, HOWEVER, the "click" event of those LABELs still work. And I can't control which of those LABELs have disabled radio buttons or not. Well, technically I can, but this would be totally bad from performance standpoint, and from clean coding standpoint. As you can see, this situation creates more and more complications and confusions. Thats why I recommend the code lines in part-B above should also make LABELs look disabled, so that I didn't have to use those LABELs' "click" events.