abstract: $(document).ready(function(){ //隱藏二級與三級下拉菜單 $('.twobox').hide() $('.three').hide() //當鼠標移動到包含二級菜單的一級菜單時顯示當前二級菜單
$(document).ready(function(){
//隱藏二級與三級下拉菜單
$('.twobox').hide()
$('.three').hide()
//當鼠標移動到包含二級菜單的一級菜單時顯示當前二級菜單
$('.one>li').mouseover(function(){
$(this).find('.twobox').slideDown(500)
})
//當鼠標移出包含二級菜單的一級菜單時隱藏當前二級菜單
$('.one>li').mouseleave(function(){
$(this).find('.twobox').slideUp(500)
})
//當鼠標移動到包含三級菜單的二級菜單時顯示當前三級菜單
$('.two').mouseover(function(){
$(this).find('.three').slideDown(500)
})
//當鼠標移出包含三級菜單的二級菜單時隱藏當前三級菜單
$('.two').mouseleave(function(){
$(this).find('.three').slideUp(500)
})
})
Correcting teacher:查無此人Correction time:2018-12-27 09:22:41
Teacher's summary:三級聯(lián)動,做的不錯。不過沒有html代碼,沒辦法驗證效果。相信你做的是對的,加油。