jQuery实用的手机触屏滑动导航菜单代码



201 800 267



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

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