<header>
<nav class="clearfix">
<h1 class="fl">
![](images/logo.png)
</h1>
<div class="nav-r fl">
<p id="mainPageUserMenu" style="background:url(images/blackdown.png) right center no-repeat" class="visitor fr">未登录</p>
<script>
$(function(){
$("#mainPageUserMenu").click(function(event){
event.stopPropagation();
if($('.subMenu').css("display") == "none"){
$('.subMenu').show();
}else{
$('.subMenu').hide();
}
});
<!-- 点击页面关闭下拉框-->
$(document).on("click",function(){
$('.subMenu').hide();
});
$(document).on("click",".visitor",function(event){
event.stopPropagation();
$('.subMenu').show();
});
$(document).on("click",".subMenu",function(event){
event.stopPropagation();
});
});
</script>
<ul class="subMenu fr" style="position: relative;list-style: none; top:50px;right:-100px;">
<li class="myCount"><a href="javascript:navCommon.MyAccountBtnFunc()">我的账户</a></li>
<li class="loginOut fll"><a href="javascript:navCommon.LoginOutBtnFunc()">退出登录</a></li>
</ul>
</div>
</nav>
</header>
网友评论