jQuery How to distinguish click() and dblcick() for a DIV element?

If I subscribe dblclick() and click() for a DIV element and make double click by mouse on the DIV, the click() handler calls first before dblclick() is called. How to avoid handling click() before the dblclick()?

UPDATE: The question has already asked before Prevent click event from firing when dblclick event fires. But here are good answers too.

6
задан Community 23 May 2017 в 12:04
поделиться