HTML
<div id="test">
<input type="checkbox" id="check1" class="checkall"/><label for="check1">1</label>
<input type="checkbox" id="check2" class="checkall"/><label for="check2">2</label>
<input type="checkbox" id="check3" class="checkall"/><label for="check3">3</label>
</div>
<br>
<input type="button" id="selectall" value="Select All">
jQuery
$("#test").buttonset();
$("#selectall").button();
$("#selectall").toggle(
function () { $("#test .checkall").prop("checked", true).buttonset("refresh"); },
function () { $("#test .checkall").prop("checked", false).buttonset("refresh"); }
);
I want to select all button is clicked. But it does not change visually. I’d appreciate if you help.
If you meant you wanted to change the visual of the Select all button as well, then it might be better to make that a check box as well.
In any case, the answer by sdepont is correct in the sense you need to use
buttonin there and notbuttonset.Check this : http://jsfiddle.net/x3QY3/1/
HTML :
JQuery: