title: How to cancel the submit of a button with jQuery
body: <p>When I'm using jQuery UI input feature, when button has been clicked, it submit/refresh the entire webpage.  How can I stop/cancel the entire web to reload?</p>
  
  <pre><code>&lt;input style='width:65px;' type='button' class='ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all Bags' id='Buy' name='".$idn."' value='Buy Bags'&gt;
  </code></pre>
  
  <p>Was it something like:</p>
  
  <pre><code>$('.Bags').click(function(){
      var $a = $(this).val();
      var $b = $(this).attr('id');
      var $c = $(this).attr('name');
      /* input/button is the issue, how do i stop the form from refreshing? */
  });
  </code></pre>
  
  <p>Thanks in advance!</p>
  
  <p><strong>EDIT</strong><p>
  After learning a few things here/there, found another easy way to do this, tho some may disagree, but it works so far:</p>
  
  <pre><code>&lt;input style='width:65px;' type='button' class='Bags' id='Buy' name='".$idn."' value='Buy Bags' onclick='return false;'&gt;
  </code></pre>
  
  <p><p>
  By adding "<strong>onClick='return false;'</strong>" will stop the form from refreshing/reloading.</p>