jQuery code to disable double click event

jQuery code to disable double click event on the webpage.

$(document).ready(function(){
  $("*").dblclick(function(e){
    e.preventDefault();
  });
});

Above jQuery code will disable double click event for all the controls on the webpage. If you want to disable for specific control, let's say a button with ID "btnSubmit" then,

$(document).ready(function(){
  $('#btnSubmit').dblclick(function(e){
    e.preventDefault();
  });
});

Feel free to contact me for any help related to jQuery, I will gladly help you.



Responsive Menu
Add more content here...