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



133 529 177



特效描述: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>



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


热门标签: flash导航菜单 flash导航条 flash导航 flash菜单 flash下拉菜单 flash下拉导航菜单 h5动画导航 h5动画菜单 html5动画导航 html5动画菜单 收缩菜单 收缩导航 右键菜单 导航切换 菜单切换 浮动菜单 浮动导航 滑动导航菜单 滑动导航 滑动菜单 滚动导航菜单 滚动菜单 滚动导航 浮动 悬浮 悬浮层 悬浮框 浮动层 浮动框 浮动插件 悬浮插件 收缩展开 展开收缩 收缩 展开 浮动提示框 在线客服 导航菜单 导航条 菜单栏 导航栏 分类导航 响应式导航条 响应式导航 浮动菜单 浮动导航 收缩菜单 收缩导航 二级菜单 二级导航菜单 二级导航 qq在线客服 qq客服 在线客服插件 侧边菜单 侧边导航

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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