﻿
$.fn.extend({

    check: function() {
        return this.each(function() { this.checked = true; });
    },

    uncheck: function() {
        return this.each(function() { this.checked = false; });
    },

    toggle: function() {
        return this.each(function() { this.checked = !this.checked; });
    },

    enabled: function(enableIt) {
        if (enableIt == null || enableIt == undefined) { return !($(this).attr("disabled") == "disabled"); } else { $(this).each(function() { if (enableIt) { $(this).removeAttr("disabled"); } else { $(this).attr("disabled", "disabled"); } }); return this; } 
    },

    cbchecked: function(checkIt) {
        if (checkIt == null || checkIt == undefined) { return ($(this).attr("checked")); } else { $(this).each(function() { if (checkIt) { $(this).removeAttr("checked"); } else { $(this).attr("checked", "checked"); } }); return this; } 
    }
    
});



