I am trying to have a checkbox that checks/unchecks all the other checkboxes.
I am using this code:
$(\"#checkall\").toggle( function () {
Try filtering out the checkbox in your selectors.
$("#checkall").toggle( function () { $(".kselItems:not(#checkall)").attr('checked', 'checked'); }, function () { $(".kselItems:not(#checkall)").removeAttr("checked"); });