how to use checkbox as toggle button in jquery code example Example: jquery toggle checkbox checkBoxes.attr("checked", !checkBoxes.attr("checked"));