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
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
$.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) {
>
$('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
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
5 matches
Mail list logo