Categories
WordPress 知识

js实现弹出菜单

var userpanel = $(“.user-sub-menu”);
var h = userpanel.outerHeight();

$(“.thb-user-icon-container”).hover(function(){
userpanel.css(“height”,”0px”).show();
userpanel.animate({“height” : h + “px”},300);
},function(){
userpanel.hide();
// userpanel.animate({“height” : “0px”},300);
});
$(“.user-sub-menu”).hover(function(){
userpanel.show();
// userpanel.animate({“height” : h + “px”},300);
},function(){
userpanel.css(“height”,”0px”).hide();
userpanel.animate({“height” : “0px”},300);
});

Leave a Reply

Your email address will not be published. Required fields are marked *