(function(){         // check if all are checked based on if the number of checkboxes total         // is equal to the number of checkboxes checked         if ($finishBoxes.length == $finishBoxes.filter(':checked').length) {             $('#submit0pd').attr("disabled", false);         }          else{             $('#submit0pd').attr("disabled", true);         }     }); 