On 7/9/07, cfdvlpr <[EMAIL PROTECTED]> wrote:
I have about 10 checkbox input elements with the same name and I'd
like to not let the user select more than 3 of them.  How can I do
this with Jquery?

You can try this:
$.fn.limit = function(n) {
 var self = this;
 this.click(function(){ return (self.filter(":checked").length<=n); });
}
$("input:checkbox").limit(3);

~Sean

Reply via email to