这是一个从商城扒出来的导航下拉效果,代码很简洁,主要由jQuery的animate+opacity来完成。
function dropMenu(obj) {
$(obj).each(function() {
var theSpan = $(this);
var theMenu = theSpan.find(".submenu");
var tarHeight = theMenu.height();
theMenu.css({height: 0, opacity: 0});
theSpan.hover(
function() {
$(this).addClass("selected");
theMenu.stop().show().animate({height: tarHeight, opacity: 1}, 400);
},
function() {
$(this).removeClass("selected");
theMenu.stop().animate({height: 0, opacity: 0}, 400, function() {
$(this).css({display: "none"});
});
}
);
});
}
$(document).ready(function() {
dropMenu(".drop-menu-effect");
});
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791