代碼如下,如何復用代碼來實現(xiàn)二級菜單淡入淡出的效果?求解=。=$li_1.hover(function () {//二級菜單效果 ? ?$li_1_content.stop(true,true).fadeIn(0);}, function () { ? ?$li_1_content.fadeOut(500, function () { ? ? ? ?//$li_1_content.css("display", "none"); ? ?});});$li_2.hover(function () {//二級菜單效果 ? ?$li_2_content.stop(true,true).fadeIn(0);}, function () { ? ?$li_2_content.fadeOut(500, function () { ? ? ? ?//$li_2_content.css("display", "none"); ? ?});});$li_3.hover(function () {//二級菜單效果 ? ?$li_3_content.stop(true,true).fadeIn(0);}, function () { ? ?$li_3_content.fadeOut(500, function () { ? ? ? ?$li_3_content.css("display", "none"); ? ?});});
頁面二級菜單代碼復用
慕少7132257
2017-10-12 19:30:04