<p>This method is a shortcut for <code>.bind('mouseover', handler)</code> in the first variation, and <code>.trigger('mouseover')</code> in the second.</p>
<p>The <code>mouseover</code> event is sent to an element when the mouse pointer enters the element. Any HTML element can receive this event.</p>
<p>The event handler can be bound to any element:</p>
<pre>$('#outer').mouseover(function() {
$('#log').append('<div>Handler for .mouseover() called.</div>');
});</pre>
<p>Now when the mouse pointer moves over the <spanclass="output">Outer</span><code><div></code>, the message is appended to <code><div id="log"></code>. We can also trigger the event when another element is clicked:</p>
<pre>$('#other').click(function() {
$('#outer').mouseover();
});</pre>
<p>After this code executes, clicks on <spanclass="output">Trigger the handler</span> will also append the message.</p>
<p>This event type can cause many headaches due to event bubbling. For instance, when the mouse pointer moves over the <spanclass="output">Inner</span> element in this example, a <code>mouseover</code> event will be sent to that, then trickle up to <spanclass="output">Outer</span>. This can trigger our bound <code>mouseover</code> handler at inopportune times. See the discussion for <code>.mouseenter()</code> for a useful alternative.</p>
<h4><spanclass="desc">Show the number of times mouseover and mouseenter events are triggered.
mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element.</span></h4>
<div class="out overout"><p>move your mouse</p><div class="in overout"><p>move your mouse</p><p>0</p></div><p>0</p></div>
<div class="out enterleave"><p>move your mouse</p><div class="in enterleave"><p>move your mouse</p><p>0</p></div><p>0</p></div>