On 7/10/07, cfdvlpr <[EMAIL PROTECTED]> wrote:
That works very well.  Could you also grey out the unchecked
checkboxes after 3 are checked?

$.fn.limit = function(n) {
 var self = this;
 this.click(function(){
   (self.filter(":checked").length==n)?
     self.not(":checked").attr("disabled",true).addClass("disabled"):
     self.not(":checked").attr("disabled",false).removeClass("disabled");
 });
}
$("input:checkbox").limit(3);

~Sean

Reply via email to