jQuery實用的手機觸屏滑動導航菜單代碼



207 827 276



特效描述:jQuery 手機觸屏 滑動導航菜單,jQuery手機滑動導航菜單

代碼結構

1. 引入JS

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/flexible.js"></script>
<script type="text/javascript" src="js/iscroll.js"></script>
<script type="text/javascript" src="js/navbarscroll.js"></script>

2. HTML代碼

<h2 class="htit">demo示例一</h2>
<div class="wrapper wrapper01" id="retr">
	<div class="scroller">
		<ul class="clearfix">
			<li><a href="javascript:void(0)">全部科目</a></li>
			<li><a href="javascript:void(0)">會計從業</a></li>
			<li><a href="javascript:void(0)">會計職稱</a></li>
			<li><a href="javascript:void(0)">注會</a></li>
			<li><a href="javascript:void(0)">稅務師</a></li>
			<li><a href="javascript:void(0)">國際證書</a></li>
			<li><a href="javascript:void(0)">更多</a></li>
			<li><a href="javascript:void(0)">更多注會</a></li>
			<li><a href="javascript:void(0)">國際證書2</a></li>
			<li><a href="javascript:void(0)">更多4</a></li>
			<li><a href="javascript:void(0)">更多5</a></li>
		</ul>
	</div>
</div>
<h2 class="htit">demo示例二</h2>
<div class="wrapper wrapper02" id="wrapper02">
	<div class="scroller">
		<ul class="clearfix">
			<li><a href="javascript:void(0)">全部科目</a></li>
			<li><a href="javascript:void(0)">會計從業</a></li>
			<li><a href="javascript:void(0)">會計職稱</a></li>
			<li><a href="javascript:void(0)">注會</a></li>
			<li><a href="javascript:void(0)">稅務師</a></li>
			<li><a href="javascript:void(0)">國際證書</a></li>
			<li><a href="javascript:void(0)">更多</a></li>
			<li><a href="javascript:void(0)">更多注會</a></li>
			<li><a href="javascript:void(0)">國際證書2</a></li>
			<li><a href="javascript:void(0)">更多4</a></li>
			<li><a href="javascript:void(0)">更多5</a></li>
		</ul>
	</div>
</div>
<h2 class="htit">demo示例三</h2>
<div class="wrapper wrapper03" id="wrapper03">
	<div class="scroller">
		<ul class="clearfix">
			<li><a href="javascript:void(0)">全部科目</a></li>
			<li><a href="javascript:void(0)">會計從業</a></li>
			<li><a href="javascript:void(0)">會計職稱</a></li>
			<li><a href="javascript:void(0)">注會</a></li>
			<li><a href="javascript:void(0)">稅務師</a></li>
			<li><a href="javascript:void(0)">國際證書</a></li>
			<li><a href="javascript:void(0)">更多</a></li>
			<li><a href="javascript:void(0)">更多注會</a></li>
			<li><a href="javascript:void(0)">國際證書2</a></li>
			<li><a href="javascript:void(0)">更多4</a></li>
			<li><a href="javascript:void(0)">更多5</a></li>
		</ul>
	</div>
</div>
<h2 class="htit">demo示例四</h2>
<div class="wrapper wrapper04" id="sass">
	<div class="scroller">
		<ul class="clearfix">
			<li><a href="javascript:void(0)">全部科目</a></li>
			<li><a href="javascript:void(0)">會計從業</a></li>
			<li><a href="javascript:void(0)">會計職稱</a></li>
			<li><a href="javascript:void(0)">注會</a></li>
			<li><a href="javascript:void(0)">稅務師</a></li>
			<li><a href="javascript:void(0)">國際證書</a></li>
			<li><a href="javascript:void(0)">更多</a></li>
			<li><a href="javascript:void(0)">更多注會</a></li>
			<li><a href="javascript:void(0)">國際證書2</a></li>
			<li><a href="javascript:void(0)">更多4</a></li>
			<li><a href="javascript:void(0)">更多5</a></li>
		</ul>
	</div>
</div>
<h2 class="htit">demo示例五</h2>
<div class="wrapper02" id="demo05">
	<div class="scroller">
		<ul class="clearfix">
			<li><a href="javascript:void(0)">全部科目</a></li>
			<li><a href="javascript:void(0)">會計從業</a></li>
			<li><a href="javascript:void(0)">會計職稱</a></li>
			<li><a href="javascript:void(0)">注會</a></li>
			<li><a href="javascript:void(0)">稅務師</a></li>
			<li><a href="javascript:void(0)">國際證書</a></li>
			<li><a href="javascript:void(0)">更多</a></li>
			<li><a href="javascript:void(0)">更多注會</a></li>
			<li><a href="javascript:void(0)">國際證書2</a></li>
			<li><a href="javascript:void(0)">更多4</a></li>
			<li><a href="javascript:void(0)">更多5</a></li>
		</ul>
	</div>
</div>
<h2 class="htit">demo示例六</h2>
<div class="wrapper02" id="demo06">
	<div class="scroller">
		<ul class="clearfix">
			<li><a href="javascript:void(0)">北京</a></li>
			<li><a href="javascript:void(0)">上海</a></li>
			<li><a href="javascript:void(0)">廣州</a></li>
			<li><a href="javascript:void(0)">深證</a></li>
			<li><a href="javascript:void(0)">杭州</a></li>
			<li><a href="javascript:void(0)">武漢</a></li>
			<li><a href="javascript:void(0)">天津</a></li>
			<li><a href="javascript:void(0)">鄭州</a></li>
			<li><a href="javascript:void(0)">海口</a></li>
			<li><a href="javascript:void(0)">鄭州</a></li>
			<li><a href="javascript:void(0)">長春</a></li>
			<li><a href="javascript:void(0)">長沙</a></li>
			<li><a href="javascript:void(0)">南京</a></li>
			<li><a href="javascript:void(0)">西安</a></li>
		</ul>
	</div>
</div>
<div style="padding:1rem .4rem;line-height:.6rem;font-size:.34rem">
		參數說明:<br />
		className:'cur', //當前選中點擊元素的class類名<br />
		clickScrollTime:300, //點擊后滑動時間<br />
		duibiScreenWidth:0.4, //單位以rem為準,默認為0.4rem<br />
		fingerClick:0, //目標第0或1個選項觸發,必須每一項長度一致,方可用此項<br />
		endClickScroll:function(thisObj){}//回調函數<br />
</div>
<script type="text/javascript">
	$(function(){
		//demo示例一到四 通過lass調取,一句可以搞定,用于頁面中可能有多個導航的情況
		$('.wrapper').navbarscroll();
		//demo示例五 通過id調取
		$('#demo05').navbarscroll({
			defaultSelect:6,
			endClickScroll:function(obj){
				console.log(obj.text())
			}
		});
		//demo示例六 通過id調取
		$('#demo06').navbarscroll({
			defaultSelect:3,
			scrollerWidth:6,
			fingerClick:1,
			endClickScroll:function(obj){
				console.log(obj.text())
			}
		});
	});
</script>



用戶評論
大牛,別默默的看了,快登錄幫我點評一下吧!:)      登錄 | 注冊


熱門標簽: flash導航菜單 flash導航條 flash導航 flash菜單 flash下拉菜單 flash下拉導航菜單 h5動畫導航 h5動畫菜單 html5動畫導航 html5動畫菜單 收縮菜單 收縮導航 右鍵菜單 導航切換 菜單切換 浮動菜單 浮動導航 滑動導航菜單 滑動導航 滑動菜單 滾動導航菜單 滾動菜單 滾動導航 滑動 滑塊 滑動門 觸屏滑動 滑動插件 滑塊插件 導航菜單 導航條 菜單欄 導航欄 分類導航 響應式導航條 響應式導航 滑動導航菜單 滑動導航 滑動菜單 固定導航 固定菜單 導航菜單插件 導航插件 菜單插件
?
×
×

注冊

官方QQ群

掃描上面二維碼加微信群

官方QQ群

jQuery/js討論群
群號:642649996
Css3+Html5討論群
群號:322131262

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

老夫子电子