Why unchecked jQuery UI radio button's label appears "checked" after refresh in FF and IE?
Posted
by Daj pan spokój
on Stack Overflow
See other posts from Stack Overflow
or by Daj pan spokój
Published on 2010-06-16T13:31:16Z
Indexed on
2010/06/16
14:12 UTC
Read the original article
Hit count: 571
I've got 2 radio buttons with labels: button A is checked by default in HTML (checked="checked"
).
They're then processed with jQuery UI Radio Button.
When I check button B and refresh the page, B's label is displayed as checked (it has CSS ui-state-active
class).
And A's label is displayed as unchecked, even though it's A button that is actually checked.
It happens in Firefox (3) and IE (8).
In Chrome (5) it works fine - after refresh A's label is displayed as checked.
<input class="ui-helper-hidden-accessible" id="show-all-hotels" name="radio" CHECKED="CHECKED" type="radio">
<label aria-disabled="false" role="button" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" aria-pressed="false" for="show-all-hotels">
<span class="ui-button-text">All tours</span>
</label>
<input class="ui-helper-hidden-accessible" id="show-availability" name="radio" type="radio">
<label aria-disabled="false" role="button" aria-pressed="true" class="UI-STATE-ACTIVE ui-button ui-widget ui-state-default ui-button-text-only ui-corner-right" for="show-availability">
<span class="ui-button-text">Only available at</span>
</label>
Do You know why is it happening and how to make checked button label appear as checked in all browsers?
© Stack Overflow or respective owner