2012-06-11 49 views
0

我有一个下拉菜单,您可以看到here on jsfiddle。它能正常工作,直到我包含颜色更改脚本,该脚本设置和更改导航链接中文本的字母颜色。颜色更改脚本中断slideToggle下拉菜单

由于您可能会在jsfiddle上看到,当用户将鼠标悬停在菜单上(或者进入自动滑动切换狂热!)时,slideToggle会一直触发,只能在进入和离开时触发DIV。

有人可能会帮助这项工作?

感谢,

尼克

回答

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(); 

    }); 
+0

谢谢,固定它。 – Nick

+0

很高兴听到它! –

相关问题