Permalänk
Medlem

Fråga om animationer med jQuery

Får inte rätt på min kod nedan när man snabbt för musen över div-taggen.
Om man gör det så åker inte div.caption tillbaka till "bottom: 0px".

Antar att det är något med stop() som jag inte gjort rätt.

var imageContainer = $('div.image'); imageContainer.hover( function() { $(this).find('div.profil').stop(true, false).fadeIn("normal", function() { $(this).parent().find('div.caption').animate({ bottom : "-67px" }, 300, function() { }); }); },function() { $(this).find('div.caption').animate({ bottom : "0px" }, 300, function() { $(this).parent().find('div.profil').fadeOut("normal", function() { }); }); } );

Visa signatur