Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery: hover (mouseleave event fired when mouse is over child)
    primarykey
    data
    text
    <p>I want to create a zoom effect on some thumbs.</p> <p>Here is my javascript simplified code :</p> <pre><code>parent.hover( function(){ parent.stop().animate({/* css */}, inputZoomDuration, "linear"); wrapper.stop().animate({/* css */}, inputZoomDuration, "linear"); child.stop().animate({/* css */}, inputZoomDuration, "linear"); }, function(){ alert("leave"); child.stop().animate({/* css */}, 140, "linear"); wrapper.stop().animate({/* css */}, 140, "linear"); parent.stop().animate({/* css */}, 140, "linear"); } ); </code></pre> <p>and the html is like : </p> <pre><code>&lt;div parent&gt; &lt;div wrapper&gt; &lt;div child&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I increase the size of all my divs when I over the "parent". But a soon as I over (or leave, btw) one of the child, the alert appears. Without the alert, the result is a very bugy animation. Is there any way to prevent the mouseleave event to be fired when a child is overed?</p> <p>Best regards,</p> <p>thanks.</p> <p><strong>Edit :</strong> Here is the greasemonkey script : <a href="http://userscripts.org/scripts/show/94786" rel="nofollow">http://userscripts.org/scripts/show/94786</a> and a link to test it : <a href="http://browse.deviantart.com/" rel="nofollow">http://browse.deviantart.com/</a> We can see in the console that the mouseleave event is trigerred when I leave the orange div, unlike this example : <a href="http://www.jsfiddle.net/wnuS6/3/" rel="nofollow">http://www.jsfiddle.net/wnuS6/3/</a> where the event is not fired when I leave the red div.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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