Grow your CSS skills. Land your dream job.

When hover, fadein/out just repeats

  • # October 14, 2009 at 9:02 pm

    I’m trying simple fade in / out effects on hover over "li" …it works but it just keeps repeating (fadein/out) when i keep my mouse over them.

    Also, how can i make the effects so the ‘li’ that i hover will only have the animation instead of the entire ‘li’

    Code:
    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">





    # October 17, 2009 at 3:16 am

    Hello,
    Yeah, it will repeat the animation if you hover over it for a number of times in a short span. To prevent this just use a stop() function before calling the fadein/fadeout function

    Code:
    $(this).stop().fadeOut() ;

    try assigning some classes then it might move only the li you hover on.. But the code looks fine to me.. it should only animate the item on which you hover… What exactly is happening?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".