I\'d like a short smallest possible javascript routine that when a mousedown occurs on a button it first responds just like a mouseclick and then if the user keeps the butto
When the button is pressed, call window.setTimeout with your intended time and the function x, and set the timer again at the end of x but this time with a smaller interval.
Clear the timeout using window.clearTimeout upon release of the mouse button.