jQuery动画标签折叠式菜单特效代码

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

以下是 jQuery动画标签折叠式菜单特效代码 的示例演示效果:

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

部分效果截图:

jQuery动画标签折叠式菜单特效代码

HTML代码(index.html):

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="gb2312" />
<title>jQuery动画标签折叠式菜单</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="css/reset.css"  />
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/blue/style.css">
<link rel="stylesheet" type="text/css" href="css/blue/color.css">
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="js/accordion-single.js"></script>

<!--[if IE 7]>
	<link rel="stylesheet" type="text/css" href="css/font-awesome-ie7.min.css" />
<![endif]-->

<!--[if lte IE 9]>
    
    <style type="text/css">
        .content{
			height: 240px;
        }
        .nav label{
        	border-bottom:1px solid #A3A3A3;
        }
        .content h6{                          /*Main Color*/
			background-color:#68D8FF;
		}
	</style>
<![endif]-->

</head>
<body>

<section class="nav">
  <div>
    <input id="label-1" name="lida" type="radio" checked/>
    <label for="label-1" id="item1"><i class="icon-dashboard" id="i1"></i>Label One<i class="icon-lock i-right1"></i><i class="icon-unlock i-right2"></i></label>
    <div class="content" id="a1">
      <h4>Accordion Menu</h4>
      <p>Web page backgrounds used to be commonplace, but they became unpopular once designers figured out that visitors to web pages didn’t want their eyes wrenched out by gaudy tiled background patterns. With text being as hard to read on-screen as it is, it’s adding insult to injury to inflict some nasty paisley mosaic background (or worse) on the poor reader, too.</p>
      <h6>The following collection of Web sites offers some outstanding references on CSS and its proper use on well-crafted Web pages. The very first reference from jquery is terrific</h6>
    </div>
  </div>
  <div>
    <input id="label-2" name="lida" type="radio"/>
    <label for="label-2" id="item2"><i class="icon-leaf" id="i2"></i>Label Two<i class="icon-lock i-right1"></i><i class="icon-unlock i-right2"></i></label>
    <div class="content" id="a2">
      <h4>Accordion Menu</h4>
      <p>Web page backgrounds used to be commonplace, but they became unpopular once designers figured out that visitors to web pages didn’t want their eyes wrenched out by gaudy tiled background patterns. With text being as hard to read on-screen as it is, it’s adding insult to injury to inflict some nasty paisley mosaic background (or worse) on the poor reader, too.</p>
      <h6>The following collection of Web sites offers some outstanding references on CSS and its proper use on well-crafted Web pages. The very first reference from jquery is terrific</h6>
    </div>
  </div>
  <div>
    <input id="label-3" name="lida" type="radio"/>
    <label for="label-3" id="item3"><i class="icon-trophy" id="i3"></i>Label Three<i class="icon-lock i-right1"></i><i class="icon-unlock i-right2"></i></label>
    <div class="content" id="a3">
      <h4>Accordion Menu</h4>
      <p>Web page backgrounds used to be commonplace, but they became unpopular once designers figured out that visitors to web pages didn’t want their eyes wrenched out by gaudy tiled background patterns. With text being as hard to read on-screen as it is, it’s adding insult to injury to inflict some nasty paisley mosaic background (or worse) on the poor reader, too.</p>
      <h6>The following collection of Web sites offers some outstanding references on CSS and its proper use on well-crafted Web pages. The very first reference from jquery is terrific</h6>
    </div>
  </div>
  <div>
    <input id="label-4" name="lida" type="radio"/>
    <label for="label-4" id="item4"><i class="icon-gift" id="i4"></i>Label four<i class="icon-lock i-right1"></i><i class="icon-unlock i-right2"></i></label>
    <div class="content" id="a4">
     <h4>Accordion Menu</h4>
      <p>Web page backgrounds used to be commonplace, but they became unpopular once designers figured out that visitors to web pages didn’t want their eyes wrenched out by gaudy tiled background patterns. With text being as hard to read on-screen as it is, it’s adding insult to injury to inflict some nasty paisley mosaic background (or worse) on the poor reader, too.</p>
      <h6>The following collection of Web sites offers some outstanding references on CSS and its proper use on well-crafted Web pages. The very first reference from jquery is terrific</h6>
    </div>
  </div>
  <div>
    <input id="label-5" name="lida" type="radio"/>
    <label for="label-5" id="item5"><i class="icon-question-sign" id="i5"></i>Label Five<i class="icon-lock i-right1"></i><i class="icon-unlock i-right2"></i></label>
    <div class="content" id="a5">
      <h4>Accordion Menu</h4>
      <p>Web page backgrounds used to be commonplace, but they became unpopular once designers figured out that visitors to web pages didn’t want their eyes wrenched out by gaudy tiled background patterns. With text being as hard to read on-screen as it is, it’s adding insult to injury to inflict some nasty paisley mosaic background (or worse) on the poor reader, too.</p>
      <h6>The following collection of Web sites offers some outstanding references on CSS and its proper use on well-crafted Web pages. The very first reference from jquery is terrific</h6>
    </div>
  </div>
</section>
</body>
</html>







JS代码(accordion-single.js):

$(document).ready(function(){
	/* Nomenclature **************/
var label= $('label');
	var content= $('.content');
	/* Default values ***********/
$('i.i-right2:first').show();
	$('i.i-right1:first').hide();
	$('.content').not(":first").hide();
	/* Mouse click (label)****/
$('label').on("click",function(){
	/* Nomenclature **************/
var tLabel = $(this);
	var tContent = tLabel.next();
	/* Default values ***********/
$('i.i-right1').show();
	$('i.i-right2').hide();
	content.slideUp("normal");
	tContent.slideDown("slow");
	/* Hide and show right icon */
$(tLabel).children('i.i-right1').hide();
	$(tLabel).children('i.i-right2').show();
	/* Open and close content */
if(tContent.is(":visible")){
	return;
}
}
);
}
);
	

CSS代码(reset.css):

/* CSS reset */
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}
html,body{margin:0;padding:0;}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
address,caption,cite,code,dfn,th,var{font-style:normal;font-weight:normal;}
ol,ul{list-style:none;}
caption,th{text-align:left;}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
q:before,q:after{content:'';}
abbr,acronym{border:0;}
section,header{display:block;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
144.13 KB
Html Js 菜单导航特效1
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章