<span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mlp </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">x</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">:</span><span class="lit" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">0</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">y</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">:</span><span class="lit" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">0</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">};</span>
<span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">function</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> documentHandler</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(){</span>
<span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">var</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $current </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">this</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">===</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> document </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">?</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">this</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">)</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">:</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">this</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">).</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">contents</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">();</span>
<span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $current</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mousemove</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">function</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">e</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">){</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">jQuery</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mlp </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">x</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">:</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">e</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">pageX</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">y</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">:</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">e</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">pageY</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">}});</span>
<span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $current</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">find</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">"iframe"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">).</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">load</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">documentHandler</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">);</span>
<span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">}</span>
<span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">$</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">documentHandler</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">);</span>
<span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">fn</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">ismouseover </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">function</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">overThis</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">)</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">{</span>
<span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">var</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> result </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">false</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">;</span>
<span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">this</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">eq</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="lit" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">0</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">).</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">each</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">function</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">()</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">{</span>
<span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">var</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $current </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">this</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">).</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">is</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">"iframe"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">)</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">?</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">this</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">).</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">contents</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">().</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">find</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="str" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">"body"</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">)</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">:</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">(</span><span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">this</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">);</span>
<span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">var</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> offset </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $current</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">offset</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">();</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> result<br /> </span>
<span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> result </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> offset</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">left</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">$</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mlp</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">x </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">&&</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> offset</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">left </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">+</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $current</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">outerWidth</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">()</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mlp</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">x </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">&&</span>
<span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> offset</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">top</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><=</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">$</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mlp</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">y </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">&&</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> offset</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">top </span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">+</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $current</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">outerHeight</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">()</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mlp</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">y</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">;</span>
<span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">});</span>
<span class="kwd" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">return</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> result</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">;</span>
<span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">};</span>
$("div").ismouseover()
NOTE : The solution does not work if the element is an iframe. Because the mousemove event does not fire over the iframe, and the Mouse Last Position is not updated.