That does a perfect job to disable the checkboxes which is great.
However, it atually makes the checkbox color turn more white that
grey.  Would it be rather difficult to actually change the color of
the checkbox to a grey color as there currently is nothing in CSS
supported by the latest browsers to do this yet?

> $.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