I have a form and group of checkboxes in it. (These checkboxes are dynamically created but I dont think it is important for this question). The code that generates them look
use this i hope to help you i know that this is a late answer but if any one come here again
$("#all").change(function () { $("input:checkbox").prop('checked', $(this).prop("checked")); });