[jQuery] Re: How to check multiple checkboxes checked at a time

2007-08-19 Thread Potluri
Thanks a lot for your suggestion. Its really awesome. George-107 wrote: > > > I dare say someone can offer a better solution for your first request: > To know whether all checkboxes are checked. I'd probably try !$ > ("#id1,#id2,#id3").is(":not(:checked)") which returns true if all are > unche

[jQuery] Re: How to check multiple checkboxes checked at a time

2007-08-18 Thread Pops
On Aug 18, 4:28 pm, Potluri <[EMAIL PROTECTED]> wrote: > Is there a way to check like $("#id1,#id2,#id3").attr("checked"); should > return true if all of them is checked. I believe another possible idiom would be: fResult = #('[EMAIL PROTECTED]@[EMAIL PROTECTED]:checked').length == 3; > and

[jQuery] Re: How to check multiple checkboxes checked at a time

2007-08-18 Thread Yehuda Katz
$.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) { >

[jQuery] Re: How to check multiple checkboxes checked at a time

2007-08-18 Thread Joan Piedra
$('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]> wro

[jQuery] Re: How to check multiple checkboxes checked at a time

2007-08-18 Thread George
I dare say someone can offer a better solution for your first request: To know whether all checkboxes are checked. I'd probably try !$ ("#id1,#id2,#id3").is(":not(:checked)") which returns true if all are unchecked (Note the ! at the beginning). Your second request is easy: To know whether at lea