How do I trigger a double click event on an element?
s1lver opened this issue · 6 comments
s1lver commented
$('.dblclick').dblclick(function () {
console.log($(this));
});
This code does not work...
RamonSmit commented
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)
s1lver commented
So, I already tried. But there is no effect
s1lver commented
If you use unbind (), then the whole list breaks down
$(document).unbind().on('dblclick', ".dblclick", function() {
console.log('Dblclick');
});
s1lver commented
https://jsfiddle.net/4vogfw6o/2/
Dblclick on the 16 item
s1lver commented
Hi!
The problem is solved by setting the timeouts.