jQuery: disable submit button if an error is found...

jQuery: disable submit button if an error is found...

The code below will show the remaining character count. I'm trying to figure out how to disable the submit button if the user exceeds the 140 character count and re-enable once they're in the "safezone" again...

I thought I could just add: $("#edit-message-send").css({disabled: true}); in the event of an error, and then $("#edit-message-send").css({disabled: false}); if they correct it, but it's not working in either situation...
$(function() {
        if($("input[name='method[txt]']")) {
                $("input[name='method[txt]']").click(function() {

                if(this.checked) {
                        $('span#charCount').show();
                        var initialCharCount = $('textarea#edit-message-body').val().length;
                        if(initialCharCount > 140) {
                                $('span#charCount').html('<strong><font color="red">You may only have up to 140 characters for SMS messages.</font></strong>');
                        } else {
                                $('span#charCount').html(initialCharCount + ' of 140 characters used');
                        }
                        $('textarea#edit-message-body').keyup(function() {
                                var charLength = $(this).val().length;
                                $('span#charCount').html(charLength + ' of 140 characters used');
                                if(charLength > 140)
                                        $('span#charCount').html('<strong><font color="red">You may only have up to 140 characters for SMS messages.</font></strong>');
                                     
                                });
                } else {
                        $('span#charCount').hide();
                }

                });
               

        }
});