我有一个html菜单,我希望子菜单将逐个滑动,
〔实施例:
http://jsfiddle.net/MotoTony/3armym6y/
但是当我添加菜单级别时,它不再起作用,
<div id="nav">
<ul class="nav">
<li class="menus">
<a href="#">Hover Here</a>
<ul class="nav-child">
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
</ul>
</li>
</ul>
http://jsfiddle.net/MotoTony/s3yfyv7k/
一如既往,感谢您的协助!
答案 0 :(得分:3)
检查这个小提琴是你想要的???
http://jsfiddle.net/s3yfyv7k/2/
var slide = function(who)
{
who.slideDown('slow', function(){
var next = $(this).next('li');
if (next)
slide(next);
});
}
$(".menu1 > a").hover( function() {
slide($('.nav-child li:first'));
} )
缺少目标选择器
slide($('.nav-child li:first'));