Jquery 简单的Tab选项卡特效
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TAB特效</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
</head> <body>
<style type="text/css">
*{padding:0; margin:0;}
ul,ol{list-style-type:none;} body{font-size:12px;}
.tab_box{width:500px; border:1px solid #000; margin:100px auto 0px auto;}
.tab_box ul{width:80px; height:400px; background-color:#eee; display:block; float:left;}
.tab_box ul li{display:block; width:100%; height:40px; line-height:40px; text-align:center; background-color:#bbb; margin-top:10px; cursor:pointer;}
.tab_box ul .tab_one{background-color:#abcdef;}
.tab_span{width:410px; height:400px; overflow:hidden; border:1px solid #000; margin-left:5px; float:right;}
.tab_span_c{width:100%; height:100%; background-color:#ccc; display:none;} </style>
<script type="text/javascript">
$(document).ready(function(){
$(".tab_box .tab_span .tab_span_c:first").css("display","block");
$(".tab_box ul li").click(function(event){
var $btnlistindex = $(this).index();
$(".tab_box .tab_span .tab_span_c").eq($btnlistindex).show().siblings().hide();
$(".tab_box ul li").eq($btnlistindex).addClass("tab_one").siblings().removeClass("tab_one");
});
});
</script>
<div class="tab_box">
<ul>
<li class="tab_one">选项按钮1</li>
<li>选项按钮2</li>
<li>选项按钮3</li>
<li>选项按钮4</li>
<li>选项按钮5</li>
</ul>
<div class="tab_span">
<div class="tab_span_c">
1sadfasdfasdf1sadfasdfasdf1sadfasdfasdf
</div>
<div class="tab_span_c">
2sadfasdfasdf1sadfasdfasdf1sadfasdfasdf
</div>
<div class="tab_span_c">
3sadfasdfasdf1sadfasdfasdf1sadfasdfasdf
</div>
<div class="tab_span_c">
4sadfasdfasdf1sadfasdfasdf1sadfasdfasdf
</div>
<div class="tab_span_c">
5sadfasdfasdf1sadfasdfasdf1sadfasdfasdf
</div>
</div>
</div> </body>
</html>
最终效果如下:


Jquery 简单的Tab选项卡特效的更多相关文章
- jquery简单实现tab选项卡效果
html: <ul class="tab"> <li>最新</li> <li class="cur">热门< ...
- jQuery简单的轮播特效
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 简单竖向Tab选项卡
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- 使用jQuery开发tab选项卡插件
为了复习巩固jQuery的插件开发.HTML和CSS方面的知识,做了一个简单的tab选项卡插件,简单记录一下开发.使用的过程,以备日后使用. 一.插件效果 tab选项卡插件常用的功能均已实现,包括:动 ...
- js 实现tab选项卡
最近一直在研究js 如果不及时复习的话前边学到的东西很快就会忘掉,所以把前段时间的一个简单的tab选项卡的思路写出来也算复习了一下吧, 第一步:先把布局写出来: <div id="d ...
- jQuery实现TAB选项卡切换特效简单演示
本文实例为大家分享jQuery实现TAB选项卡切换特效,供大家参考,具体内容如下 1.tab切换 on ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 ...
- jQuery Tab选项卡切换代码
jQuery Tab选项卡切换代码是一款简单的jquery tab选项卡切换网页特效代码样式,可以修改tab选项卡相关样式. 代码下载:http://www.huiyi8.com/sc/10863.h ...
- Jquery tab 选项卡 无刷新切换
转载的 演示地址:http://www.freejs.net/demo/29/index.html 首页>>TAB标签>>jquery实现简单的Tab切换菜单(2013-09- ...
- jQery简单Tab选项卡效果
简单的Tab效果 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> < ...
随机推荐
- 短随机唯一id生成参考
<?php function getRandOnlyId() { //新时间截定义,基于世界未日2012-12-21的时间戳. $endtime=1356019200;//2012-12-21时 ...
- Android WebRTC 音视频开发总结
www.cnblogs.com/lingyunhu/p/3621057.html 前面介绍了WebRTCDemo的基本结构,本节主要介绍WebRTC音视频服务端的处理,,转载请说明出处(博客园RTC. ...
- IOS性能调优系列:使用Instruments动态分析内存泄漏
硬广:<IOS性能调优系列>第二篇,持续更新,欢迎关注. 第一篇介绍了Analyze对App做静态分析,可以发现应用中的内存泄漏问题,对于有些内存泄漏情况通过静态分析无法解决的,可以通过动 ...
- MediaInfo源代码分析 3:Open()函数
我们来看一下MediaInfo中的Open()函数的内部调用过程 首先open函数封装了MediaInfo_Internal类中的open()函数 //打开文件 size_t MediaInfo::O ...
- 某外企mono for android试题
Hitcents C#Programming Test This test is designed to evaluate generalC# and Xamarin development skil ...
- B和B+树学习笔记
二叉树 如果数据都在内存中,我们就用平衡二叉查找树即可,这样效率最高. 在前面的文章中我使用过红黑树(大致平衡的二叉查找树),500万节点时,搜索的深度可以达到50,也就是需要50次指针操作才能获取到 ...
- HTML5笔记(一)
1.HTML5提供了一些新的元素和属性,例如<nav>(网站导航块)和<footer>.这些标签较有利于搜索引擎的索引整理,同时更好的帮助小屏幕装置和视频人士使用,除此之外,还 ...
- CSS3弹性盒模型之Flexbox是布局模块box-sizing & box-orient & box-direction & box-ordinal-group
css3 box-sizing属性 box-sizing属性可以为三个值之一:content-box(default),border-box,padding-box. content-box,bord ...
- Linq to Object实现分页获取数据
最后调用的CSharp代码可以是: int totalcount = dboperator.Customers.Count(); //总记录数 int pagesize = 100;//每页显示数 / ...
- DataTable无法使用AsEnumerable ()的解决办法
本人定义了DataSet后将表1赋给datatable,在写linq时调用datatable.asenumerable(),但报datatable不包含asenumerable的定义,求高手指点.Sy ...