title: Why dblClick submiting the value of .click (single click) in Jquery
body: <p>I have a problem with submiting data into the <code>django</code> form so basically I have model with the 2 fields which take value 1 or 0 so I Created functions with <code>jquery</code> and I set them into the buttons but when i press double click it submit the value of <code>.click</code> function not the <code>dblClick</code> function.</p>
  
  <p>my code is here in html:</p>
  
  <pre><code>&lt;br&gt;
  &lt;button type="submit" id="up_vote_btn"&gt;Up Vote &lt;/button&gt;
  &lt;br&gt;
  </code></pre>
  
  <p>my jquery code: </p>
  
  <pre><code>&lt;script&gt;
  
  $(document).ready(function(){
   $("#up_vote_btn").click(function(){
     document.getElementById("id_up_vote").setAttribute('value','1');
     document.getElementById("id_down_vote").setAttribute('value','0');
    });
  });
  
  $(document).ready(function(){
    $("#up_vote_btn").dblclick(function(){
      document.getElementById("id_up_vote").setAttribute('value','0');
      document.getElementById("id_down_vote").setAttribute('value','0');
     });
  });
  </code></pre>