Reputation: 8624
I have some checkboxes in a button set and I want to use Jquery to check one of the checkboxes.
It works, however, the visual representation of the checkbox does not update. ie, after executing $('#chk').attr('checked',true);
the checked value is true, but the checkbox apears unchecked.
Demoed here: http://jsfiddle.net/kralco626/jzVjT/1/
Thanks!
Upvotes: 4
Views: 5634
Reputation: 4635
Try
'true'
rather than
true
Attributes are always string values.
Edit:
Never mind. No clue on buttonset functionality but things aren't behaving normally. Check the documentation for the API.
Upvotes: -1
Reputation: 630389
You need to call the refresh
method on the buttonset to update the visual state after programmatic changes to the checked
state, like this:
$("#test").buttonset("refresh");
Upvotes: 16