Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Problem with Hover…

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #41853
    charlie
    Participant

    [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

    #120329
    lucas572
    Member

    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”);
    });

    #120618
    charlie
    Participant

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.