RamonSmit/Nestable2

How do I trigger a double click event on an element?

s1lver opened this issue · 6 comments

$('.dblclick').dblclick(function () {
    console.log($(this));
  });

This code does not work...

Is it a dynamic created element? If so:

Try:

$(document).on('dblclick', '.dblclick',function () {
    console.log($(this));
  });

(Not sure if the syntax is correct, cannot check it at this point now but please try)

So, I already tried. But there is no effect

In that case I'm going to ask @pjona if he can take a little sneekpeek in here

If you use unbind (), then the whole list breaks down

$(document).unbind().on('dblclick', ".dblclick", function() {
    console.log('Dblclick');
  });

https://jsfiddle.net/4vogfw6o/2/

Dblclick on the 16 item

Hi!
The problem is solved by setting the timeouts.