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.
Probably not the best way to do it: You could set a timeout in the click handler function and clear the timeout in the doubleclick handler function.
The timeout could call a function that will impliment what you really want to happen onClick and that way you can have your dblclick() function handle what happens when the users double clicks.