Grow your CSS skills. Land your dream job.

Fadeback problem

  • # June 24, 2011 at 5:00 pm

    Hello all,

    I’m working on a new project for a restaurant, and I’m having some issues the way I set an element to fade in and out.

    The basic functionality exists, but it’s doing something extra and I don’t know enough about jQuery to fix it :)

    Here’s the test site: http://vilathai.bconserv.com

    What they wanted was a quick thing to just show the hours of the restaurant, so I made a little fading div appear when you hover over “Hours” on the page. The fading seems to work just fine, but the problem happens when in between fades, you move your mouse quickly out of the box and then back in, it doesn’t come fully back.

    It’s kind of a minor issue, but there’s been times where I move the mouse too quickly and it fades it out 100% and it won’t come back at all.

    Here’s the code I did manage to write:


    $j(document).ready(function(){
    $j('a.hours').mouseover(function() {
    $j('.hourslide').stop().fadeIn();
    }).mouseout(function() {
    $j('.hourslide').stop().fadeOut();
    });
    });

    Any help is appreciated :)

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

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