Grow your CSS skills. Land your dream job.

Problem with Hover…

  • # January 8, 2013 at 4:43 pm

    [See CodePen](http://codepen.io/anon/pen/wyjGk):

    When you hover over the “FB” link at right of bar a window opens, but as soon as cursor moves off of “FB” link the window closes.

    How can I keep window open as long as cursor is hovering over the window so users can select links from inside of open window?

    Thank you,
    C

    # January 8, 2013 at 5:30 pm

    You would need some form of JavaScript or jQuery to keep it open after hover. The idea of it would be to make a class called active and add that class to your div when someone hovers over the FB link.

    Here’s some jQuery I wrote for a slider that you should be able to re-work to fit this situation :)

    var sliderActive = $(“#wrapper #slider-single”);

    sliderActive.not(“:first”).removeClass(“active”);

    sliderActive.on(“hover”, function() {
    sliderActive.removeClass(“active”);
    $(this).addClass(“active”);
    });

    # January 10, 2013 at 9:51 pm

    Problem solved. Thank you for the help. It got me on the right track.

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

You must be logged in to reply to this topic.

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