Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试实现一个菜单,您可以在其中悬停第一级,然后打开第二级和第三级(第二级中的第一项)。
我认为使用superfish 的-callbackonHide函数或使用-argument 是可能的,但到目前为止它失败了。pathClass
onHide
pathClass
我的菜单看起来像这样: jsfiddle
在 jsfiddle 的示例中,它应该悬停ASDF,第三级将打开,bla 1并且bla 2
ASDF
bla 1
bla 2
任何提示如何解决这个问题将不胜感激。
您应该能够使用onShow回调来做您想做的事:
onShow
$('.mainnav>ul').superfish({ onShow: function() { $( this ).find( ".sf-with-ul:first" ).closest("li").trigger("mouseenter"); } });
http://jsfiddle.net/petersendidit/XnxaE/7/