我只是试图让我在下拉菜单中选择的任何按钮(颜色)在单击后粘贴。现在,无论我选择什么颜色,菜单都会向上滑动并默认为蓝色。谢谢您的帮助!
这是我的查询,小提琴如下:
var nav = $("#catpicker");
//add indicators and hovers to submenu parents
nav.find("li").each(function() {
if ($(this).find("ul").length > 0) {
//show subnav on hover
$(this).mouseenter(function() {
$(this).find("ul").stop(true, true).slideDown();
});
//hide submenus on exit
$(this).mouseleave(function() {
$(this).find("ul").stop(true, true).slideUp();
});
}
});
})(jQuery);