Animate an Image after hovering an item a second

Posted by mikep on Stack Overflow See other posts from Stack Overflow or by mikep
Published on 2010-04-25T17:27:11Z Indexed on 2010/04/25 17:33 UTC
Read the original article Hit count: 264

Filed under:
|
|
|
|

Hey, after some tries to get this to work, i ask you, if you know where my mistake is.

This is my code until now:

$(".menu a").hover( function () {
  $(this).data('timeout', setTimeout( function () {
        $(this).hover(function() {
            $(this).next("em").animate({opacity: "show", top: "-65"}, "slow");  
        }, function() {
            $(this).next("em").animate({opacity: "hide", top: "-75"}, "fast");
        });
  }, 1000));
}, function () {

  clearTimeout($(this).data('timeout'));

});

i would be happy about some help.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript