在网上下的JS,这样的效果,浮动的QQ,可以隐藏,展开
但是现在有个问题,展开时,无论点哪里都隐藏,而且上面加的QQ或链接都点不开就又隐藏了
谁能帮忙改下,只有点这里(在线客服)
时才隐藏,并且点这里
是好使的
求高手啊
代码
<body>
<div style="height:1000px;"></div>
<script type="text/javascript" src="http://www.jsfoot.com/skin/js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#floatShow").bind("click",function(){
$("#onlineService").animate({width:"show", opacity:"show"}, "normal" ,function(){
$("#onlineService").show();
});
$("#floatShow").attr("style","display:none");
$("#floatHide").attr("style","display:block");
return false;
});
$("#online_qq_layer").bind("click",function(){
$("#onlineService").animate({width:"hide", opacity:"hide"}, "normal" ,function(){
$("#onlineService").hide();
});
$("#floatShow").attr("style","display:block");
$("#floatHide").attr("style","display:none");
return false;
});
});
</script>
<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
a,img{border:0;}
/* online */
#online_qq_tab a,.onlineMenu h3,.onlineMenu li.tli,.newpage{background:url(images/float_s.gif) no-repeat;}
#onlineService,.onlineMenu,.btmbg{background:url(images/float_bg.gif) no-repeat;}
#online_qq_layer{z-index:9999;position:fixed;right:0px;top:0;margin:150px 0 0 0;}
*html,*html body{background-image:url(about:blank);background-attachment:fixed;}
*html #online_qq_layer{position:absolute;top:expression(eval(document.documentElement.scrollTop));}
#online_qq_tab{width:28px;float:left;margin:120px 0 0 0;position:relative;z-index:9;}
#online_qq_tab a{display:block;height:118px;line-height:999em;overflow:hidden;}
#online_qq_tab a#floatShow{background-position:-30px -374px;}
#online_qq_tab a#floatHide{background-position:0 -374px;}
#onlineService{display:inline;margin-left:-1px;float:left;width:130px;display:none;background-position:0 0;padding:10px 0 0 0;}
.onlineMenu{background-position:-262px 0;background-repeat:repeat-y;padding:0 15px;}
.onlineMenu h3{height:36px;line-height:999em;overflow:hidden;border-bottom:solid 1px #ACE5F9;}
.onlineMenu h3.tQQ{background-position:0 10px;}
.onlineMenu h3.tele{background-position:0 -47px;}
.onlineMenu li{height:36px;line-height:36px;border-bottom:solid 1px #E6E5E4;text-align:center;}
.onlineMenu li.tli{padding:0 0 0 28px;font-size:12px;text-align:left;}
.onlineMenu li.zixun{background-position:0px -131px;}
.onlineMenu li.fufei{background-position:0px -190px;}
.onlineMenu li.phone{background-position:0px -244px;}
.onlineMenu li a.newpage{display:block;height:36px;line-height:999em;overflow:hidden;background-position:5px -100px;}
.onlineMenu li img{margin:8px 0 0 0;}
.onlineMenu li.last{border:0;}
.wyzx{padding:8px 0 0 5px;height:57px;overflow:hidden;background:url(images/webZx_bg.jpg) no-repeat;}
.btmbg{height:12px;overflow:hidden;background-position:-131px 0;}
</style>
<div id="online_qq_layer">
<div id="online_qq_tab">
<a id="floatShow" style="display:block;" href="javascript:void(0);">收缩</a>
<a id="floatHide" style="display:none;" href="javascript:void(0);">展开</a>