基于jquery的淡入淡出选项卡效果代码
2010-06-28 00:00
781 查看
经典选项卡
.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;}
$(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");
});
});
经典选项卡手机卖场脚本之家海澜男人精品居家
1111111111111111111111
www.jb51.net
333333333333333333333
444444444444444444
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
.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;}
$(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");
});
});
经典选项卡手机卖场脚本之家海澜男人精品居家
1111111111111111111111
www.jb51.net
333333333333333333333
444444444444444444
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
相关文章推荐
- 基于jquery的淡入淡出选项卡效果代码
- 基于jquery的淡入淡出选项卡效果代码
- 基于jQuery实现的仿百度首页滑动选项卡效果代码
- 基于jQuery实现的仿百度首页滑动选项卡效果代码
- jquery实现经典的淡入淡出选项卡效果代码
- jquery实现经典的淡入淡出选项卡效果代码
- 代码简洁的上方滑动门(选项卡tab)jquery插件可重复使用,淡入淡出效果(用)
- 基于jquery实现的上传图片及图片预览效果代码
- 【示例代码】基于jQuery和CSS3的图片层叠效果插件
- jQuery实现滚动切换的tab选项卡效果代码
- jQuery实现滚动切换的tab选项卡效果代码
- 基于jquery实现最简单的选项卡切换效果
- 基于Jquery的开发个代阴影的对话框效果代码
- 基于jquery实现的文字淡入淡出效果
- 基于json的jquery地区联动效果代码
- 基于jquery的鼠标拖动效果代码
- 基于jquery实现的树形菜单效果代码
- 基于jquery的动画效果代码