代码简单明了
- $(function(){
- jQuery.fn.extend({
- check: function() {
- return this.each(function() { this.checked = true; });
- },
- uncheck: function() {
- return this.each(function() { this.checked = false; });
- };
- }),
- $("#check").bind("click", function(){ $("input[@type=checkbox]","#prod_list").check(); }),
- $("#uncheck").bind("click", function(){ $("input[@type=checkbox]","#prod_list").uncheck(); }),
- );