Alex Rivera | Logout

How do I use jQuery to disable a textarea + Submit button?

Asked 2010-12-16T22:09:57.360
11

After a user submits a comment, I want the textarea and summit button to be "disabled" and somewhat visually disabled.

Like Youtube.

How can I do that with Jquery using the simplest plugin and/or method?

Edit
Report

1 Answer

1
    jQuery(document).ready(function() {
    $('form').submit(function(){
        $('input[type=submit]', this).attr('disabled', 'disabled');
    });
   });
answered 2010-12-16T22:13:55.307

Your Answer