$(":checkbox").attr("checked","anyThingWillCheckIt")
$(":checkbox").removeAttr("checked")

Glen


On 9/27/07, Erik Beeson <[EMAIL PROTECTED]> wrote:
>
> To check or uncheck a checkbox, assign true or false to its 'checked'
> property (untested): $('#myCheckbox')[0].checked = true; or
> $('#myCheckbox').attr('checked', true);
>
> But it looks like you're trying to enable/disable them, in which case you
> probably want $(...).attr('disabled', 'disabled'); and
> $(...).removeAttr('disabled');
>
> --Erik
>
>
> On 9/27/07, voltron <[EMAIL PROTECTED]> wrote:
> >
> >
> > How would one toggle a checkbox?
> >
> > This does not work:
> >
> > $("#postcode_all").toggle(function(){
> >         $("#intended_postcode-0").attr("disabled", "disabled");
> >             },function(){
> >         $("#intended_postcode-0").attr("enabled", "enabled");
> >     });
> >
> > Thanks
> >
> >
>

Reply via email to