0

I have a drop down menu which you can see here on jsfiddle. It works fine until I include the colour change script, which sets and changes the colours of letters for the text in the nav links.

As you will probably be able to see on jsfiddle, the slideToggle keeps getting triggered when the user hovers over the menu (or just goes into an auto slideToggle frenzy!), when it should only be triggered when entering and leaving the div.

Could someone help get this working?

Thanks,

Nick

4

1 に答える 1

1

トップビットを次のように変更します。

    $('.dropdown').hover(function () {
        // When the event is triggered, grab the current element 'this' and
        // find it's children '.sub_navigation' and display/hide them
        $(this).find('.sub_navigation').slideDown();
    }, function () {
        $(this).find('.sub_navigation').slideUp();

    });
于 2012-06-11T23:11:40.060 に答える