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();    });  });  

Comments

Popular posts from this blog

8 Best CMSs for building a well structured social networking website

​ PHP Web Programming and Business Benefits of PHP Development