title: add delay to onmouseleave action for a certain div - javascript, html, jquery
body: <pre><code>&lt;div class="container4" style="position: relative; left: 0px; top: 0px; width: 80px; height: 90px; border: solid 1px black;" onmouseenter="this.style.border='solid 3px red';" onmouseleave="this.style.border='solid 1px black';" onclick="this.style.background='rgba(0, 0, 0, 0.5)';" oncontextmenu="return false;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/X4NXf/1/" rel="nofollow">http://jsfiddle.net/X4NXf/1/</a></p>
  
  <p>I need a simple delay of the onmouseleave action for a certain class of divs.</p>
  
  <p>If possible, that delayed action should be canceled if you enter the div again before delayed action gets triggered, and then started again (with delay starting again from the beginning) after you leave the div again.</p>
  
  <p>Preferred solution would be jquery function, but I am open for any other approach.</p>