title: Button inside form triggers http post but it shouldn't
body: <p>I produced an html form that contains some buttons which should not post the form. They are only supposed to do some javascript action. But when these buttons are clicked they trigger a post request. The html code of the buttons looks like this:</p>
  
  <pre><code>&lt;button class="btn" id=some_id&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>Nothing special as you can see. Is there a way to prevent these buttons from posting the form?</p>
  
  <p>I used </p>
  
  <pre><code>$('.btn').bind('click', function() {
      some_js_code
  });
  </code></pre>
  
  <p>to bind some js functionality to the buttons.<br>
  <strong>Solution:</strong>  </p>
  
  <pre><code>$('.btn').bind('click', function() {
      some_js_code
      return false;
  });
  </code></pre>