Quantcast
Viewing latest article 37
Browse Latest Browse All 39

jQuery hover animation keeps running. Stop() variations don't help

I have weird problem with this code

    $('img').hover(function(){        var $cap = $(this).parent().find('.cap');        window.setTimeout(function(){$cap.stop(true,false).animate({bottom:164},500)},500);    },function(){        var $cap = $(this).parent().find('.cap');        window.setTimeout(function(){$cap.stop(true,false).animate({bottom:0},500)},500);    })

I can't figure out why effect keeps running up and down and wont stop. I have tried stop() with various parameters. And clearQueue(). But nothing seems to help.

Basic idea is when mouse hovers image slides up caption. And stays until mouse is completely off image, then slides down.

Any ideas what I'm doing wrong?

Live example http://jsfiddle.net/zSAYZ/

P.S. with latest Chrome on Mac caption don't slides down if mouse stays still. Whit latest Firefox caption goes just op and down until mouse is hover image.


Viewing latest article 37
Browse Latest Browse All 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>