How to prevent a double-click using jQuery?

前端 未结 15 827
孤街浪徒
孤街浪徒 2020-11-30 23:42

I have a button as such:


Within jQuery I am using the following, but it still

15条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 00:19

    In my case, jQuery one had some side effects (in IE8) and I ended up using the following :

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

    which works very nicely and looks simpler. Found it there: http://www.jquerybyexample.net/2013/01/disable-mouse-double-click-using-javascript-or-jquery.html

提交回复
热议问题