jquery右侧浮动qq在线客服菜单鼠标点击展开qq在线客服菜单



168 668 223



特效描述:jquery右侧浮动 qq在线客服菜单 鼠标点击展开 qq在线客服菜单,

代码结构

1. 引入CSS

<link href="css/online.css" rel="stylesheet" type="text/css" />

2. 引入JS

<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>

3. HTML代码

<script type="text/javascript">
function changeOnline(num){
	if(isNaN(num) && num == "")
	return;
	for(var i = 1; i <=5 ; i++){
		if(i == num){
			document.getElementById("onlineSort" + i).className = "online_bar expand";
			document.getElementById("onlineType" + i).style.display = "block";
		}else{
			document.getElementById("onlineSort" + i).className = "online_bar collapse";
			document.getElementById("onlineType" + i).style.display = "none";
		}
	}
}
$(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;
	});
	$("#floatHide").bind("click",function(){
		$('#onlineService').animate({width: 'hide', opacity: 'hide'}, 'normal',function(){
			$('#onlineService').hide();
		});
		$('#floatShow').attr('style','display:block');
		$('#floatHide').attr('style','display:none');
	});
	$(document).bind("click",function(event){
		if($(event.target).isChildOf("#online_qq_layer") == false){
			$('#onlineService').animate({width: 'hide', opacity: 'hide'}, 'normal',function(){
				$('#onlineService').hide();
			});
			$('#floatShow').attr('style','display:block');
			$('#floatHide').attr('style','display:none');
		}
	});
	$.fn.isChildAndSelfOf = function(b){
		return (this.closest(b).length > 0);
	};
	$.fn.isChildOf = function(b){
		return (this.parents(b).length > 0);
	};
});
</script>
<div id="online_qq_layer">
	<div id="online_qq_tab">
		<div class="online_icon">
			<a title id="floatShow" style="display:block;" href="javascript:void(0);">&nbsp;</a>
			<a title id="floatHide" style="display:none;" href="javascript:void(0);">&nbsp;</a>
		</div>
	</div>
	<div id="onlineService">
		<div class="online_windows overz">
			<div class="online_w_top"></div>
			<div class="online_w_c overz">
				<div class="online_bar expand" id="onlineSort1">
					<h2><a onclick="changeOnline(1)">域名/虚拟主机</a></h2>
					<div class="online_content overz" id="onlineType1">
						<ul class="overz">
							<li><a href="#" class="qq_icon">企业QQ交谈</a></li>
							<li>企业QQ:<a href="#">123456</a></li>
						</ul>
					</div>
				</div>
				<div class="online_bar collapse" id="onlineSort2">
					<h2><a onclick="changeOnline(2)">企业邮局</a></h2>
					<div class="online_content overz" id="onlineType2">
						<ul class="overz">
							<li><a href="#" class="qq_icon">企业QQ交谈</a></li>
							<li>企业QQ:<a href="#">123456</a></li>
						</ul>
					</div>
				</div>
				<div class="online_bar collapse" id="onlineSort3">
					<h2><a onclick="changeOnline(3)">建站之星/网店</a></h2>
					<div class="online_content overz" id="onlineType3">
						<ul class="overz">
							<li><a href="#" class="qq_icon">企业QQ交谈</a></li>
							<li>企业QQ:<a href="#">123456</a></li>
						</ul>
					</div>
				</div>
				<div class="online_bar collapse" id="onlineSort4">
					<h2><a onclick="changeOnline(4)">代理咨询</a></h2>
					<div class="online_content overz" id="onlineType4">
						<ul class="overz">
							<li><a href="#" class="qq_icon">企业QQ交谈</a></li>
							<li>企业QQ:<a href="#">123456</a></li>
						</ul>
					</div>
				</div>
				<div class="online_bar collapse" id="onlineSort5">
					<h2><a onclick="changeOnline(5)">网站推广</a></h2>
					<div class="online_content overz" id="onlineType5">
						<ul class="overz">
							<li><a href="#" class="qq_icon">企业QQ交谈</a></li>
							<li>企业QQ:<a href="#">123456</a></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="online_w_bottom"></div>
		</div>
	</div>
</div>
<div style="height:1200px;"></div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 顶部悬浮 底部悬浮 浮动导航菜单 qq在线客服 收缩导航菜单 二级导航菜单 图片广告 在线客服插件 文字收缩展开 下拉导航菜单 对联广告 图片收缩展开 竖直导航菜单 图标导航菜单 叠加浮动层 固定导航菜单 侧边导航菜单 树形导航菜单 网址导航菜单 导航菜单插件 文字导航菜单 滚动导航菜单 滑动导航菜单 浮动导航菜单 导航切换 右键菜单 收缩导航菜单 html5动画导航菜单 flash导航菜单 悬浮浮动漂浮 收缩收起展开 浮动提示框 在线客服咨询 导航菜单导航条

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到