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"> < ...
随机推荐
- ERROR 2003 (HY000): Can't connect to MySQL server on 'ip'(111)
问题描述: 从一台linux远程连接另一台linux上的MySQL, 出现ERROR 2003 (HY000): Can't connect to MySQL server on 'ip'(111) ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(38)-Easyui-accordion+tree漂亮的菜单导航
原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(38)-Easyui-accordion+tree漂亮的菜单导航 系列目录 本节主要知识点是easyui ...
- BZOJ 1878 SDOI 2009 HH项链 树状数组 + 脱机处理
标题效果:一些珠子项链.珠具有不同的颜色.我们问了很多次有多少种不同的颜色有过一段范围. 思考:这个问题让我学会聪明的离线实践.按左端点排序问题.加工出来的位置每种颜色首次出现.每一种颜色的下一次出现 ...
- android 03 TableLayout
MainActivity.java(默认的,什么都没有) package com.sxt.day02_02; import android.os.Bundle; import android.app. ...
- mysql 锁 实验
CREATE TABLE `kk` ( `a` ) NOT NULL, `b` ) NOT NULL, `c` ) NOT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b ...
- nginx 笔记
nginx 这个轻量级.高性能的 web server 主要可以干两件事情: 〉直接作为http server(代替apache,对PHP需要FastCGI处理器支持): 〉另外一个功能就是作为反向代 ...
- UIPickView的简单介绍
UIPickView的简单介绍 设置UIPickView的时候,我们主要需要设置一下下面的两个属性 UIPickerView *pickView1; pickView1 = [[UIPickerVie ...
- css 嵌套 元素所属类别
元素所属类别 Metadata content(元数据元素)(8) base,link,meta,noscript,script,style,template, title Flow content( ...
- 事件触发函数中的this,target,currentTarget,srcElement
要解释其中的区别,首先要理解浏览器的事件机制, 现在主流的浏览器事件基本是先捕获再冒泡,IE浏览器只有冒泡阶段 事件是在冒泡阶段触发的 看看这个HTML 当我点击"我是父节点的时候" ...
- SPFA 小优化*2
/* bzoj 2763 SPFA小优化 循环队列+SLF 顺面改掉自己之前手打qeueu的坏毛病*/ #include<iostream> #include<cstring> ...