鼠标移动至文字显示下拉菜单
作者:互联网
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>下拉框效果</title>
<style type="text/css">
.wrip>ul{
display: none;
}
</style>
<script type="text/javascript" src="/3DT/js/jquery-2.1.1.js"></script>
<script type="text/javascript">
$(function(){
var $li=$(".wrip");
$li.mouseenter(function(){
$(this).children("ul").show();
})
$li.mouseleave(function(){
$(this).children("ul").hide();
})
});
</script>
</head>
<body>
<ul>
<li class="wrip">一级菜单01
<ul>
<li>子菜单11</li>
<li>子菜单12</li>
<li>子菜单13</li>
<li>子菜单14</li>
</ul>
</ul>
</body>
标签:function,菜单,鼠标,children,li,wrip,ul,移动,下拉菜单 来源: https://www.cnblogs.com/akblog/p/16118190.html