Long press function


#1

Hello

I want to use one button for both undo and reset.
Is there long press capture mechanism?

Thanks
Waj


#2

Use the onmousedown event (instead of onclick) to record the time the mouse was pushed down.

Add an onmouseup event function which can check when onmousedown happened and take appropriate action.

On a device, use the ontouchdown event.