Note that there are some explanatory texts on larger screens.

plurals
  1. POmake onmouseenter and onmouseleave to work in chrome - html, javascript, jquery
    text
    copied!<pre><code>&lt;div style="position: relative; left: 50px; top: 30px; width: 300px; height: 150px; background: #222222;" onmouseenter="this.style.background='#aaaaaa'" onmouseleave="this.style.background='#222222';"&gt;&lt;/div&gt; </code></pre> <p><a href="http://jsfiddle.net/z8KuE/1/" rel="nofollow">http://jsfiddle.net/z8KuE/1/</a></p> <p>onmouseenter and onmouseleave events works normally in Firefox and Opera, but apparently doesn't work at all in Chrome...</p> <p>How can a simple basic div like in this fiddle become normally functional in Chrome, but <strong>without changing it's content</strong> (beside assigning a class)?</p> <p>The ideal solution, if possible, would be to somehow register onmouseenter and onmouseleave events for Chrome users, without assigning a class.</p> <p><strong>edit:</strong> I know for onmouseover and onmouseout, but they are out of question - I need some workaround for the code I have for some practical reasons.</p> <p><strong>edit 2:</strong> Right now I only have a jquery for specific class - <a href="http://jsfiddle.net/z8KuE/6/" rel="nofollow"><strong>http://jsfiddle.net/z8KuE/6/</strong></a>. But I have a LOT of divs with it's events already written in html, inside of <code>&lt;div&gt;&lt;/div&gt;</code></p> <p>So for example, I have 2 divs like these (<a href="http://jsfiddle.net/z8KuE/8/" rel="nofollow">http://jsfiddle.net/z8KuE/8/</a>). imagine there are 200 divs instead and with a lot more variety in events. How can this be handled to work in Chrome with jquery in the most practical way? (definitely not erasing content from 200 divs and writing jquery with 200 or more lines)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload