jquery右側浮動qq在線客服菜單鼠標點擊展開qq在線客服菜單



138 548 183



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

加群請備注:從官網了解到

湖北30选5开奖结果走势图表