Jquery实现Tab效果
来源:互联网 发布:钉钉saas的数据架构 编辑:程序博客网 时间:2024/06/11 00:28
<!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>
<title></title>
<script src="Public/jquery.js" type="text/javascript"></script>
<style type="text/css">
.tab
{
background-color: #FAFAFA;
margin: 5px 8px;
padding: 5px 10px;
}
.tab p span
{
background-color: #EFEFEF;
border: 1px solid #CCCCCC;
cursor: pointer;
margin-right: 6px;
padding: 2px 5px;
}
.tab p span.current
{
background-color: #FAFAFA;
border-bottom-color: #fafafa;
}
.tab p
{
border-bottom: 1px solid #CCCCCC;
font-weight: bold;
padding: 0 10px 2px;
}
.tab li
{
border-bottom: 1px dotted #CCCCCC;
padding-bottom: 3px;
margin: 5px 0;
}
.tab .mhot, .tab.allhot
{
display: none;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$(".tab span:first").addClass("current"); //为第一个SPAN添加当前效果样式
$(".tab ul:not(:first)").hide(); //隐藏其它的UL
$(".tab span").mouseover(function() {
$(".tab span").removeClass("current"); //去掉所有SPAN的样式
$(this).addClass("current");
$(".tab ul").hide();
$("." + $(this).attr("id")).fadeIn('slow');
});
});
</script>
</head>
<body>
<div class="tab">
<p>
<span id="tab1">tab1</span> <span id="tab2">tab2</span> <span id="tab3">tab3</span></p>
<ul class="tab1">
<li>我和我的祖国</li><li>最爱的地方</li><li>我和我</li></ul>
<ul class="tab2">
<li>一花一世办</li><li>一草一天堂</li></ul>
<ul class="tab3">
<li>阿里巴巴</li><li>阿里巴巴</li><li>一草一天堂</li><li>我和我的祖国</li><li>最爱的地方</li></ul>
</div>
</body>
</html>
- Jquery实现Tab效果
- 利用Jquery实现tab效果
- jquery自己实现tab效果
- 使用jQuery实现Tab页效果
- jquery实现的Tab效果插件
- jquery 实现简单tab选项卡效果
- jquery简单实现tab选项卡效果
- jquery简单实现tab选项卡效果
- jquery简单实现tab选项卡效果
- jQuery效果之tab
- jquery tab效果
- jquery实现tab标签选项卡自动切换效果
- jquery 简单两步实现tab切换效果
- jQuery+css3实现的超酷圆角tab选项卡切换效果
- 非插件,css + jquery 实现tab页效果
- 用jQuery实现选tab项卡效果
- jQuery实现仿淘宝tab栏切换效果
- ActivityGroup实现Tab效果
- 11 01 24 慢
- Jan 25, 2011, 2
- 11 01 25 很杂
- 《C和指针》学习笔记(四)
- 翻译:JavaScript and Ant
- Jquery实现Tab效果
- class Inchoo_Dispatcher_Model_Observer
- flex调试问题
- java 基本数据
- mips下的pppoe驱动
- ecshop 中category 页面分页page_size
- JS json object 与 string 相互转换
- NetBeans 时事通讯(刊号 # 134 - Jan 25, 2011)
- GetNetPath