title: jQuery Disable Button function on second click
body: <p>I'm trying to prevent users from clicking the button on the page twice, so what I've been doing is hiding that button with jQuery after it's been clicked once. But is there a way instead of hiding that button to disable with jQuery that button after it was clicked once?</p>
  
  <p>I've tried </p>
  
  <pre><code>$(document).ready(function () {
      $('#onClickHideButton').click(function () {
          $(this).prop('disabled', true);
      });
  });
  </code></pre>
  
  <p>but the problem that I'm having with this function is that as soon as the button is clicked it it becomes disabled before it get the chance to submit the form, so the form never gets submitted.</p>