jquery 经典选项卡代码
2013-09-05 20:22
197 查看
<!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=gb2312" />
<title>经典选项卡</title>
<script type="text/网页特效" src="http://www.php100.com/网页特效lib/jquery/jquery.网页特效"></script>
<style type="text/css教程">
.tab{text-align:left;width:500px;border:#ccc 1px solid;margin:100px;}
.tab dt{border-bottom:#ccc 1px solid;height:25px;background:#f1f1f1;margin-bottom:-1px;height:25px;line-height:25px;}
.tab dt strong{padding:0 15px;color:#444;}
.tab dt a{display:inline-block;cursor:pointer;padding:0 10px;text-align:center;background:#f1f1f1;color:#000;}
.tab dt a.on{background:#fff;color:#333;font-weight:bold;border-bottom:1px solid #fff;border-right:1px solid #ccc;border-left:1px solid #ccc;}
.tab dd{padding:10px;height:200px;clear:both;}
</style>
</head>
<body>
<script type="text/网页特效">
$(function(){
var tabtitle = ".tab dl dt a";
var tabcontent = ".tab dl ul";
$(tabtitle + ":first").addclass("on");
$(tabcontent).not(":first").hide();
$(tabtitle).unbind("click").bind("click", function(){
$(this).siblings("a").removeclass("on").end().addclass("on");
var index = $(tabtitle).index( $(this) );
$(tabcontent).eq(index).siblings(tabcontent).hide().end().fadein("slow");
});
});
</script>
<div class="tab">
<dl>
<dt><strong>经典选项卡</strong><a>手机卖场</a><a>脚本之家</a><a>海澜男人</a><a>精品居家</a></dt>
<dd>
<ul>1111111111111111111111</ul>
<ul>www.jb51.net</ul>
<ul>333333333333333333333</ul>
<ul>444444444444444444</ul>
</dd>
</dl>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=gb2312" />
<title>经典选项卡</title>
<script type="text/网页特效" src="http://www.php100.com/网页特效lib/jquery/jquery.网页特效"></script>
<style type="text/css教程">
.tab{text-align:left;width:500px;border:#ccc 1px solid;margin:100px;}
.tab dt{border-bottom:#ccc 1px solid;height:25px;background:#f1f1f1;margin-bottom:-1px;height:25px;line-height:25px;}
.tab dt strong{padding:0 15px;color:#444;}
.tab dt a{display:inline-block;cursor:pointer;padding:0 10px;text-align:center;background:#f1f1f1;color:#000;}
.tab dt a.on{background:#fff;color:#333;font-weight:bold;border-bottom:1px solid #fff;border-right:1px solid #ccc;border-left:1px solid #ccc;}
.tab dd{padding:10px;height:200px;clear:both;}
</style>
</head>
<body>
<script type="text/网页特效">
$(function(){
var tabtitle = ".tab dl dt a";
var tabcontent = ".tab dl ul";
$(tabtitle + ":first").addclass("on");
$(tabcontent).not(":first").hide();
$(tabtitle).unbind("click").bind("click", function(){
$(this).siblings("a").removeclass("on").end().addclass("on");
var index = $(tabtitle).index( $(this) );
$(tabcontent).eq(index).siblings(tabcontent).hide().end().fadein("slow");
});
});
</script>
<div class="tab">
<dl>
<dt><strong>经典选项卡</strong><a>手机卖场</a><a>脚本之家</a><a>海澜男人</a><a>精品居家</a></dt>
<dd>
<ul>1111111111111111111111</ul>
<ul>www.jb51.net</ul>
<ul>333333333333333333333</ul>
<ul>444444444444444444</ul>
</dd>
</dl>
</div>
</body>
</html>
相关文章推荐
- jquery实现经典的淡入淡出选项卡效果代码
- jquery实现经典的淡入淡出选项卡效果代码
- jQuery实现滚动切换的tab选项卡效果代码
- JQuery选项卡tab、折叠菜单代码
- JS实现仿Windows经典风格的选项卡Tab切换代码
- jquery代码实现通用选项卡特效功能
- jquery实现超简洁的TAB选项卡效果代码
- 49个jQuery代码经典片段
- 49个jQuery代码经典片段
- jquery.idTabs 选项卡使用示例代码
- jquery 经典动画菜单效果代码
- 代码简洁的上方滑动门(选项卡tab)jquery插件可重复使用,淡入淡出效果(用)
- 基于jQuery实现的仿百度首页滑动选项卡效果代码
- 实用的Jquery选项卡TAB示例代码
- jQuery Tab选项卡切换代码
- jQuery实现的经典竖向伸缩菜单效果代码
- 30个经典的jQuery代码开发技巧
- 49个jquery代码经典片段