title: jQuery detect how many seconds a mouse stays over element
body: <p>is there any way to detect how many seconds a mouse pointer stays on an html element?</p>
  
  <p>I would like to retrieve how many seconds a mouse stays over element to put a little delay on a callback event... if is possible :)</p>
  
  <p>i'm trying with a simple for() cycle detecting by a counter :</p>
  
  <pre><code>var time_over ; 
  $('.bean-active').live('mouseover',function(){  
    id_tag = $(this).attr("id");   
    for(time_over = 1;time_over &lt;= 3000;time_over ++){
        if(time_over == 3000){
           $('.bean-bubble,.bean-bubble img').hide();   
           $('#bean-bubble-'+id_tag+',#bean-bubble-'+id_tag+' img').show();
        }  
    }   
  });
  </code></pre>
  
  <p>the problem is that it doesn't works :(</p>
  
  <p>also i would like to bind a mouseleave event, script logic should be:</p>
  
  <pre><code>while ( mouseover element count how many time it stays over) 
    if (time == n)
    { do somenthing } 
  if (mouseleave from element earlier then time)
  { do somenthing different }
  </code></pre>