$.fn.all = function(selector) {
  return foo.filter(":checked").length == foo.length;
});

Kudos to John for that one ;)

-- Yehuda

On 8/18/07, Joan Piedra <[EMAIL PROTECTED]> wrote:
>
> $('a.toggleCheckbox').click(function(){
>     $(':checkbox').each(function(){
>         if(this.checked) {
>             this.checked = false;
>         } else {
>             this.checked = true;
>         }
>     });
>     return false;
> });
>
>
> This should do the trick.
>
> On 8/18/07, Potluri < [EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Hi,
> >   Is there a way to check a multiple check boxes checked at a time like.
> >
> > <input type='checkbox' id="id1"/>
> > <input type='checkbox' id="id3"/>
> > <input type='checkbox' id="id9"/>
> > <input type='checkbox' id="id4"/>
> >
> >
> > Is there  a way to check like $("#id1,#id2,#id3").attr("checked");
> > should
> > return true if all of them is checked.
> >
> > and also is there a way to return true if atleast one of them is checked
> >
> > like $("#id1||#id2||#id3").attr("checked"); should return true if
> > atleast
> > one id is checked.
> >
> > I'm waiting for staright response.
> >
> > Thanks in advance.
> >
> > --
> > View this message in context:
> > http://www.nabble.com/How-to-check-multiple-checkboxes-checked-at-a-time-tf4268943s15494.html#a12149798
> > Sent from the JQuery mailing list archive at Nabble.com.
> >
> >
>
>
> --
> Joan Piedra || Frontend webdeveloper
> http://joanpiedra.com/




-- 
Yehuda Katz
Web Developer | Procore Technologies
(ph)  718.877.1325

Reply via email to