Search and Top Navigation
#7072 closed bug (notabug)
Opened March 07, 2011 02:12AM UTC
Closed March 07, 2011 12:09PM UTC
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: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.button | Version: | 1.8.9 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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
1. $("span.that_contains_my_radio_buttons").buttonset();
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
1. $(".radio").removeAttr("checked");
2. $(".radio").attr("checked","checked");
3. $(".radio").get(0).checked = true;
4. $(".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
1. $("LABEL.belonging_to_my_disabled_radio_buttons").trigger("click");
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.
Thanks.
Attachments (0)
Change History (1)
Changed March 07, 2011 12:09PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Replied on the forum http://forum.jquery.com/topic/jquery-ui-buttonset-when-checked-status-of-radio-buttons-change-their-accompanying-labels-do-not-reflect-this-change-in-design