title: jQuery UI Disable All Submit Buttons on Entire Page
body: <p>Thank you for any help in advance.</p>
  
  <p>Please note I am using the jQuery UI to create / style buttons.</p>
  
  <p>When a user clicks a submit button, I want to use jQuery to disable all submit buttons, on all forms, on the entire page.</p>
  
  <p>Here is what I have so far, currently it only disables the button that was clicked, when I want it to disable all submit buttons on the page.</p>
  
  <p>For the jQuery UI:</p>
  
  <pre><code>&lt;script&gt;
  $(function() {
  $( ".button" )
  .button()
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>For disabling buttons:</p>
  
  <pre><code> &lt;script&gt;
  $(function() {
  $('.button').button().click(function() {
      $(this).button('disable');
      $(this).closest('form').submit();
      return false;
  });
  $('input:submit').button('enable');
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The submit buttons / forms look like this:</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" action="characters.php" method="post"&gt;
  &lt;input id="c_xp" class="text" type="text" value="150001" name="c_xp"&gt;
  &lt;input id="go" class="button ui-button ui-widget ui-state-default ui-corner-all" type="submit" value="Go" role="button" aria-disabled="false"&gt;
  &lt;/form&gt;
  </code></pre>