$(document).ready(function () {
$("#AOPTopMenu>ul>li").click(function () {
$(this).children(".SecondMenuBar").slideDown();
}).hover(function (e) {
var d = $(this).children(".SecondMenuBar");
var r = e.relatedTarget;
if (r != d[0]) {
d.slideUp();
}
})
})这种写法语法对吗,实现时:click了#AOPTopMenu>ul>li的内容后,下滑出一界面,但鼠标刚想放倒下滑界面,却因为离开了#AOPTopMenu>ul>li的区域,界面自动滑回去了,
现在想实现点了#AOPTopMenu>ul>li的内容后,下滑出一界面,鼠标可以放进改下滑的界面,且当鼠标从该界面拿走再上滑回去。
$("#AOPTopMenu>ul>li").click(function () {
$(this).children(".SecondMenuBar").slideDown();
}).hover(function (e) {
var d = $(this).children(".SecondMenuBar");
var r = e.relatedTarget;
if (r != d[0]) {
d.slideUp();
}
})
})这种写法语法对吗,实现时:click了#AOPTopMenu>ul>li的内容后,下滑出一界面,但鼠标刚想放倒下滑界面,却因为离开了#AOPTopMenu>ul>li的区域,界面自动滑回去了,
现在想实现点了#AOPTopMenu>ul>li的内容后,下滑出一界面,鼠标可以放进改下滑的界面,且当鼠标从该界面拿走再上滑回去。
)不变。
$(document).ready(function () {
$("#AOPTopMenu>ul>li").hover(function () {
$(this).children(".SecondMenuBar").slideDown();
}, function () {
$(this).children(".SecondMenuBar").slideUp();
})
})
)不变。
$(document).ready(function () {
$("#AOPTopMenu>ul>li").mouseover(function () {
$(this).children(".SecondMenuBar").slideDown();
});
$("#AOPTopMenu>ul>li").click(function () {
$(this).children(".SecondMenuBar").slideDown();
});
$("#AOPTopMenu>ul>li").children(".SecondMenuBar").mouseout(function () {
$(this).slideUp();
});
})