Forums

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

Home Forums JavaScript Stop animation after hovering parent item

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #161694
    asiek
    Participant

    I am using a responsive navigation menu from here , which doesn’t include a drop down animation.

    So I used this for the animation//

    $(document).ready(function () {
    $(".test").hover(function () {
            $(".sub-menu").slideToggle("slow", function () {});
        });
    });
    

    Now, when I hover over the parent item the menu slides open but once I try to hover over the child links the menu just closes.

    I did a little research and tried adding .stop() after $(".sub-menu") but it still doesn’t work.

    My question is,
    Why isn’t the sub menu staying open after hovering when using .stop()?

    Here is a fiddle.

    #161702
    asiek
    Participant
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.