jquery.checkall.js 334 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 jQuery(document).ready(function ($) { $(".selectall").click(function () { var checked_status = $(this).prop('checked'); var checkbox_name = $(this).attr('id'); $('input[name="' + checkbox_name + '[]"]').each(function () { $(this).prop('checked', checked_status); }); }); });