jQuery.fn.extend({
check: function() {
return this.each(function() { this.checked = true; });
},
uncheck: function() {
return this.each(function() { this.checked = false; });
}
});
$(function(){
$("input[type=checkbox]").check().css("border","solid 1px red");
$("input[type=radio]").uncheck().css("border","solid 1px blue");
});