jQuery平滑分栏标签切换特效js代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 jQuery平滑分栏标签切换特效js代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

jQuery平滑分栏标签切换特效js代码

HTML代码(index.html):

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery平滑分栏标签切换特效</title>
<link href='css/style.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='js/jquery1.3.2.js'></script>
<link href='css/tabbedContent.css' rel='stylesheet' type='text/css' />
<script src="js/tabbedContent.js" type="text/javascript"></script>
</head>
<body>
		<div style='padding: 15px;'>
		
			<div class='content'>
				
				<h1>Tabbed content with jQuery</h1>
				
				<p>
					An example of some tabbed content containers.
				</p> 
				
				<h2>Example:</h2>
				
				<div class='tabbed_content'>
					<div class='tabs'>
						<div class='moving_bg'>
							&nbsp;
						</div>
						<span class='tab_item'>
							Latest posts
						</span>
						<span class='tab_item'>
							Top posts
						</span>
						<span class='tab_item'>
							Partners
						</span>
						<span class='tab_item'>
							Links
						</span>
					</div>
					
					<div class='slide_content'>						
						<div class='tabslider'>
							<ul>
								<li>
									<a href='#'>
										New looks coming your way
									</a>
								</li>
								<li>
									<a href='#'>
										jQuery convertion: Panoramic Photoviewer in Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										jQuery convertion: Garagedoor effect using Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										Image slider for displaying pictures or portfolios
									</a>
								</li>
								<li>
									<a href='#'>
										AjaxTwits - Load Tweets on your website with AJAX
									</a>
								</li>
							</ul>
							<ul>
								<li>
									<a href='#'>
										Panoramic Photoviewer in Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										New looks coming your way
									</a>
								</li>
								<li>
									<a href='#'>
										jQuery convertion: Garagedoor effect using Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										jQuery convertion: Panoramic Photoviewer in Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										Lightbox + PhotoNav = LightNav
									</a>
								</li>
							</ul>
							<ul>
								<li>
									<a href='#'>
										Sieb Design | Design + Illustration
									</a>
								</li>
								<li>
									<a href='#'>
										Cybox | Internet & Communicatie
									</a>
								</li>
								<li>
									<a href='#'>
										Hypekid | Pim Arts, a freelance web-developer from the Netherlands
									</a>
								</li>
								<li>
									<a href='#'>
										Marcofolio | Marco's weblog
									</a>
								</li>
								<li>
									<a href='#'>
										Dev Tips | Become a better developer, one tip at a time
									</a>
								</li>
							</ul>
							<ul>
								<li>
									<a href='#'>
										Last.fm profile
									</a>
								</li>
								<li>
									<a href='#'>
										Gaya Design on Twitter
									</a>
								</li>
								<li>
									<a href='#'>
										My Youtube Channel
									</a>
								</li>
								<li>
									<a href='#'>
										Linked in profile
									</a>
								</li>
								<li>
									<a href='#'>
										Stuff to do with a NDS blog
									</a>
								</li>
							</ul>
						</div>
						<br style='clear: both' />
					</div>
				</div>
				
				<br />
				<br />
				
				<div class='tabbed_content'>
					<div class='tabs'>
						<div class='moving_bg'>
							&nbsp;
						</div>
						<span class='tab_item'>
							Latest posts
						</span>
						<span class='tab_item'>
							Top posts
						</span>
						<span class='tab_item'>
							Partners
						</span>
						<span class='tab_item'>
							Links
						</span>
					</div>
					
					<div class='slide_content'>						
						<div class='tabslider'>
							<ul>
								<li>
									<a href='#'>
										New looks coming your way
									</a>
								</li>
								<li>
									<a href='#'>
										jQuery convertion: Panoramic Photoviewer in Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										jQuery convertion: Garagedoor effect using Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										Image slider for displaying pictures or portfolios
									</a>
								</li>
								<li>
									<a href='#'>
										AjaxTwits - Load Tweets on your website with AJAX
									</a>
								</li>
							</ul>
							<ul>
								<li>
									<a href='#'>
										Panoramic Photoviewer in Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										New looks coming your way
									</a>
								</li>
								<li>
									<a href='#'>
										jQuery convertion: Garagedoor effect using Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										jQuery convertion: Panoramic Photoviewer in Javascript
									</a>
								</li>
								<li>
									<a href='#'>
										Lightbox + PhotoNav = LightNav
									</a>
								</li>
							</ul>
							<ul>
								<li>
									<a href='#'>
										Sieb Design | Design + Illustration
									</a>
								</li>
								<li>
									<a href='#'>
										Cybox | Internet & Communicatie
									</a>
								</li>
								<li>
									<a href='#'>
										Hypekid | Pim Arts, a freelance web-developer from the Netherlands
									</a>
								</li>
								<li>
									<a href='#'>
										Marcofolio | Marco's weblog
									</a>
								</li>
								<li>
									<a href='#'>
										Dev Tips | Become a better developer, one tip at a time
									</a>
								</li>
							</ul>
							<ul>
								<li>
									<a href='#'>
										Last.fm profile
									</a>
								</li>
								<li>
									<a href='#'>
										Gaya Design on Twitter
									</a>
								</li>
								<li>
									<a href='#'>
										My Youtube Channel
									</a>
								</li>
								<li>
									<a href='#'>
										Linked in profile
									</a>
								</li>
								<li>
									<a href='#'>
										Stuff to do with a NDS blog
									</a>
								</li>
							</ul>
						</div>
						<br style='clear: both' />
					</div>
				</div>
				
				<br />
				<br />
			</div>
		</div>
</div>
</body>
</html>









JS代码(tabbedContent.js):

//tab effectsvar TabbedContent ={
	init:function(){
	$(".tab_item").mouseover(function(){
	var background = $(this).parent().find(".moving_bg");
	$(background).stop().animate({
	left:$(this).position()['left']}
,{
	duration:300}
);
	TabbedContent.slideContent($(this));
}
);
}
,slideContent:function(obj){
	var margin = $(obj).parent().parent().find(".slide_content").width();
	margin = margin * ($(obj).prevAll().size() - 1);
	margin = margin * -1;
	$(obj).parent().parent().find(".tabslider").stop().animate({
	marginLeft:margin + "px"}
,{
	duration:300}
);
}
}
$(document).ready(function(){
	TabbedContent.init();
}
);
	

CSS代码(style.css):

body{font-size:10px;font-family:verdana,sans-serif;background-color:gray;background-image:url(backgrou.jpg);background-position:50% 50%;padding:0px;margin:0px;}
.content{width:800px;margin:0px auto;background-color:#ffffff;padding:20px;}
h1{color:#221A69;font-weight:normal;text-decoration:none;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
22.67 KB
jquery特效4
最新结算
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
HTML5实现CSS滤镜图片切换特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery+css3实现信封效果
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章