title: how to prevent double click event on submit button
body: <p>I have a submit button in my page. Sometimes when I double click it double submits obviously, and the problem is that I'm saving the information in the database so I'll have duplicate information there, and I don't want that. I tried some jquery code like below but it didn't work for me.</p>
  
  <p>Here my button tag is:
      </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="submit" id="btnSubmit" class="btn btn-large btn-success"    style="padding-right:40px; padding-left:40px; text-align:center;"&gt;
     </code></pre>
  </div>
  </div>
  </p>
  
  <p>Jquery:</p>
  
  <pre><code>   $(document).ready(function()
     {
       $('#btnSubmit').dblclick(function()
       {
          $(this).attr('disabled',true);
          return false;
       });
      });  
  </code></pre>
  
  <p>How to proceed further?Preventdefault is not working</p>
  
  <pre><code>$(document).ready(function () {
      alert("inside click");
      $("#btnSubmit").on('dblclick', function (event) {  
  
         event.preventDefault();
  
   });
  });
  </code></pre>