How can I do to detect if a simple click or double click on an HTML element <div>
I have tried the following code:
<div onclick="alert('un click')" ondblclick="alert('doble click')"> Click aqui</div>
The problem is that it does not detect the double click, it always shows me the message "one click", as I do to detect one or the other.