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
> discuss@jquery.com
> http://jquery.com/discuss/
>
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to