JS Simulate button click using hover for x seconds
<p>Hi I'm trying to simulate a button click in js with mouse hover.. For example I have a calculator component (set  of buttons in a div) in the html. What I am trying to accomplish is when the user moves the mouse pointer over a button and stays there for at least 3 seconds, the button will be "clicked" and if stays there, there will be another delay (not necessarily 3 seconds, could be 2secs or 1sec) and it will be "clicked" again.</p>

<p>I already made the Calculator component complete with click and keypress event handlers but still without the mouse over input handler..</p>

<p>What I have for that though looks something like:</p>

<pre><code>  Calculator.mouseoverListener = function(e, calculatorObject){
     setTimeout(function(){
        value = $(e.target).val();
        calculatorObject.handleInput(value); 
     } , 2000); 
  }
</code></pre>

<p>But this works like:
 (1) Mouse moves over a button (2)Regardless how long it hovers over the button, it will wait 2 secs and simulate the "click"..</p>

<p>Any hint with the approach that I could use?  </p>
