jquery slideDown()出得界面,加延时。急急!在线等!
时间:2011-09-26
来源:互联网
// 点击菜单滑动下拉,焦点不在下滑界面自动回收
$(document).ready(function () {
$("#AOPTopMenu>ul>li").hover(function () {
$(this).children(".SecondMenuBar").slideDown();
$(this).removeClass("bgColor");
$(this).addClass("SelectbgColor");
$("#zg_Iframe").css('display', 'block');
}, function () {
$(this).children(".SecondMenuBar").slideUp();
$("#zg_Iframe").css('display', 'none');
$(this).removeClass("SelectbgColor");
$(this).addClass("bgColor");
})
})
给这段代码加,实现鼠标放上不立马滑出界面,有个延时!!
$(document).ready(function () {
$("#AOPTopMenu>ul>li").hover(function () {
$(this).children(".SecondMenuBar").slideDown();
$(this).removeClass("bgColor");
$(this).addClass("SelectbgColor");
$("#zg_Iframe").css('display', 'block');
}, function () {
$(this).children(".SecondMenuBar").slideUp();
$("#zg_Iframe").css('display', 'none');
$(this).removeClass("SelectbgColor");
$(this).addClass("bgColor");
})
})
给这段代码加,实现鼠标放上不立马滑出界面,有个延时!!
作者: hdandll 发布时间: 2011-09-26
$(this).children(".SecondMenuBar").delay(1000).slideDown();
楼主试试
楼主试试
作者: calmcrime 发布时间: 2011-09-26
delay可以,但是恐怕楼主需要失去焦点时动作要回收的功能恐怕就不够咯,
可以尝试var timer=setTimeout(......)
之后在 blur的时候清除timer或者 隐藏dom
可以尝试var timer=setTimeout(......)
之后在 blur的时候清除timer或者 隐藏dom
作者: ycmjh2010 发布时间: 2011-09-26
delay的确可以.
不过搜了一下.貌似要触发animate的才能触发delay的功能.不然是无效的...
setTimeout是可以的
不过搜了一下.貌似要触发animate的才能触发delay的功能.不然是无效的...
setTimeout是可以的
作者: luoweihua7 发布时间: 2011-09-26
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28