Let's say I have a <span>. When you single-click this span, I want a save() function to fire. When you double-click the span, I want a rename() function to fire.
If you double-click the span, however, first the click event will fire, then the dblclick event. Since the click precedes dblclick, how can I tell click to not fire save() and instead defer to dblclick where rename() will be fired?
I can probably come up with a few workarounds, but is there any existing functionality in jQuery or previous (code) work that helps me with this already?
This looks helpful: single and double-click
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With