tkamath99
tkamath99

Reputation: 649

Disable Double click event in JQuery

My click event is working and i wanted to disable double click. But it is not working

Click Event:

  $(document).on("click", ".firstlevel, .secondlevel, .thirdlevel", function () {   
      if ($(this).parent().siblings(".k-icon") !== undefined) {
          $(".preloader").fadeOut();
          $(this).parent().siblings(".k-icon").click();         
      }
  });

  $(document).on("dblclick", ".firstlevel, .secondlevel, .thirdlevel", function (e) {
        e.preventDefault();
        e.stopPropogation();
    });

Upvotes: 2

Views: 2252

Answers (1)

Jeet Kumar
Jeet Kumar

Reputation: 547

Why don't you use .off() method of jquery to remove event handlers associated with given selectors?

http://api.jquery.com/off/

$(document).off("dblclick", ".firstlevel, .secondlevel, .thirdlevel")

Upvotes: 2

Related Questions