views:

89

answers:

1

I am using this to check all checkboxes.

<input type="checkbox" id="all" onclick="$('input[name*=\'selected\']').attr('checked', checked);" />

as long as I use the normal checkboxes everything works fine. When I convert all to jQuery UI checkboxes: http://jqueryui.com/demos/button/#checkbox They get checked -- but not in a visually -- the colors are not changing. I saw that when a jQuery UI checkbox is checked it gets this attribute aria-pressed="true"

Can someone help me understand how can I get this done!

A: 

There a refresh method to update the visual style after you change the checked value programmatically, like this:

$('input[name*=\'selected\']').attr('checked', checked).button("refresh")
Nick Craver
by some unknow (by me) reason this doesn't work :(
ciprian