title: Submit only once on double click
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1067464/need-to-cancel-click-mouseup-events-when-double-click-event-detected">Need to cancel click/mouseup events when double-click event detected</a><br>
    <a href="https://stackoverflow.com/questions/5944254/preventing-double-click-of-submit-button">Preventing double-click of Submit button</a>  </p>
  </blockquote>
  
  
  
  <p>I have following function</p>
  
  <pre><code>$("#btnSubmit").click(function(){
                  $("#btnSubmit").attr("disabled", "disabled");
            ....make ajax request
                $("#btnSubmit").removeAttr("disabled");
  
  }
  </code></pre>
  
  <p>Problem is that I want to handle 1st click of a double click . Or a single click . Because when user double clicks it does run the function twice . If I use .one() it will handle only single clicks . But I also want to handle double clicks but only handle it once . Whats solution ?</p>