鼠标悬浮显示二级菜单
2014-10-29 14:35
267 查看
1.布局:
2.js控制:
<div class="show"> <img src="~/images/head_icon.png" /> <div class="drop" style=" display:none; z-index:80000" id="profileMenu"> <ul> <li> <a class="pass" style="cursor: pointer" href='#'> <span>修改密码</span> </a> </li> <li> <a class="quit" style="cursor: pointer" href='#' ><span>退出</span></a> </li> </ul> </div> </div>
2.js控制:
function dropMenu(obj) { $(obj).each(function () { var theSpan = $(this); var theMenu = theSpan.find(".drop"); var tarHeight = theMenu.height(); theMenu.css({ height: 0, opacity: 0 }); var t1; function expand() { clearTimeout(t1); //theSpan.find('a').addClass("selected"); theMenu.stop().show().animate({ height: tarHeight, opacity: 1 }, 200); } function collapse() { clearTimeout(t1); t1 = setTimeout(function () { // theSpan.find('a').removeClass("selected"); theMenu.stop().animate({ height: 0, opacity: 0 }, 200, function () { $(this).css({ display: "none" }); }); }, 250); } theSpan.hover(expand, collapse); theMenu.hover(expand, collapse); }); }
相关文章推荐
- 鼠标悬浮显示二级菜单效果的jquery实现
- 鼠标悬浮显示二级菜单效果的jquery实现
- query二级菜单,鼠标经过显示二级分类,大类和小类都有链接
- 淡蓝色感应鼠标显示二级菜单的CSS导航菜单
- Html中鼠标悬停显示二级菜单的两种方法
- Jquery二级菜单,鼠标经过显示二级分类,大类和小类都有链接
- Jquery二级菜单,鼠标经过显示二级分类,大类和小类都有链接
- jQuery 二级菜单,一次显示一个小类 鼠标点击显示小类
- 二级的CSS菜单,鼠标移过显示子菜单
- [js]悬浮显示二级菜单的实现
- Selenium笔记---鼠标悬停显示二级菜单 点击下拉列表
- mm_menu.js(实现鼠标移入横向显示二级菜单效果)
- javascript 特效实现(3)—— 鼠标滑过显示二级菜单效果
- JS实现超精简响应鼠标显示二级菜单代码
- PHPCMS V9 导航条联动二级菜单(配合js css鼠标移动上去向下弹出显示二级菜单)
- 鼠标经过显示二级菜单js特效
- 纯CSS实现鼠标滑过显示子菜单的二级菜单效果
- JQuery中鼠标划过一级菜单,有二级菜单的就显示的处理
- Selenium操作示例——鼠标悬停显示二级菜单,再点击二级菜单或下拉列表
- JS-鼠标经过显示二级菜单