title: jQuery / Bootstrap3: Disable/hide button after submit
body: <p>I'm new to javascript, but I've searched extensively about this and tried dozens of different alternatives. Most of them did nothing at all, others prevented the form from submitting!</p>
  
  <p>I have the following form:</p>
  
  <pre><code>&lt;form name="buy" action="process_order.php" method="post"&gt;
      &lt;input type="hidden" name="itemid" value="{$itemid}"&gt;
      &lt;button type="submit" id="submit" name="submit" class="btn btn-sm btn-success"&gt;Buy&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to prevent double submissions by either disabling the <code>submit</code> button after submit or just make it disappear, whichever works best.</p>
  
  <p>I have tried multiple JS approaches and I dont even know which one is best, so I wont provide one here to avoid confusion.</p>
  
  <p>I'd be thankful if you could provide me a full javascript <code>&lt;script&gt;</code> snippet and anything else I eventually need. I would prefer to not use Ajax here, but let me know if that would help.</p>
  
  <p>Many thanks!</p>