Sweet!  Works like a charm-  thank you very much, Erik.

Michael


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Erik Beeson
> Sent: Monday, March 12, 2007 2:23 PM
> To: jQuery Discussion.
> Subject: Re: [jQuery] Getting checked/disabled Attributes using attr()
> 
> Assuming your checkbox is called 'cb' and your submit button is called
> 'sub', try this:
> 
> $(function() {
>       $('#cb').click(function() {
>               if($(this).is(':checked')) {
>                       $('#sub').removeAttr('disabled');
>               } else {
>                       $('#sub').attr('disabled', 'disabled');
>               }
>       });
> });
> 
> --Erik
> 
> 
> On 3/12/07, Michael E. Carluen <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> > Hello all,
> >
> > I am trying to get the checked or disabled attributes from <input
> > type="checkbox"  and a <input type="submit"  using attr() but with no
> > success.  What I am trying to do is control both elements together so I
> can
> > disable the submit button if a specified checkbox is unchecked.
> >
> > Suggestions anyone?
> >
> > Thank very much in advanceĀ…
> >
> > Michael
> > _______________________________________________
> > jQuery mailing list
> > [email protected]
> > http://jquery.com/discuss/
> >
> >
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to