原创:编写jquery 选项卡插件
2011-12-13 22:02
302 查看
<!--选项开始-->
<div class="jgfangshi Lhk">
<ul class="jquser6" >
<li><a href="#">利好</a></li><li><a href="#">利空</a></li><li class="line2"> </li>
</ul>
</div><!--jgfangshi end-->
<div class="NR6-2">
<div class="list">
<ul>
<li><a href="#">需要控制一下字数</a></li>
<li><a href="#">阿胶权证又现“末日轮”炒作</a></li>
</ul>
</div><!--list end-->
</div><!--NR6-2 end-->
<div class="NR6-2">
<div class="list">
<ul>
<li><a href="#">阿胶权证又现“末日轮”炒作</a></li>
<li><a href="#">阿胶权证又现“末日轮”炒作</a></li>
</ul>
</div><!--list end-->
</div><!--NR6-2 end-->
<script type="text/javascript">
;(function($){
$.fn.extend({
'selItem':function(options){
options=$.extend({
curr_sel:'curr_class',
showHideClass:'class_name',
},options);
$('ul>li:first',this).addClass(options.curr_sel);
$(options.showHideClass).not( ':first' ).hide();
$( 'ul>li',this).unbind( 'click' ).bind( 'click', function(){
$(this).siblings('li').removeClass(options.curr_sel).end().addClass(options.curr_sel);
var index = $('ul>li').index($(this));
$(options.showHideClass).eq( index ).siblings(options.showHideClass).hide().end().show();
} );
return this;//返回this,使方法可链
}
})
})(jQuery);
$(function(){
$('.Lhk').selItem({
curr_sel:'curr3',
showHideClass:'.NR6-2'
});
})
</script>
<style>
body { text-align: center; font-family:"宋体", arial;margin:0; padding:0; font-size:12px; color:#000;}
div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border: 0; }
div{margin:0 auto;}
li{list-style-type:none;}
h1,h2,h3,h4,h5,h6 { margin:0; padding:0;font-size:12px; font-weight:normal;}
/* Link */
a{color: #000000 !important; text-decoration:none;}
a:visited {color: #83006f;text-decoration:none;}
a:hover {color: #bc2931; text-decoration:underline;}
a:active {color: #bc2931;}
/**MK2 start**/
.list{clear:both; margin-bottom:15px; width:234px;}
.list ul{padding:6px 0 0;}
.list li{text-align:left; line-height:20px; padding:0 0 0 11px; clear:both; background:url(../img/Fk1.jpg) 3px 7px no-repeat;}
.list .line{ border-top:1px dashed #ccc; height:4px; line-height:4px; font-size:4px;}
/**MK2 end**/
.jgfangshi{border:1px solid #c8c8c8; border-bottom:none; height:25px; line-height:25px; width:234px; font-size:12px; margin-top:30px;}
.jgfangshi li{ width:84px; height:25px; float:left;border-right:1px solid #c8c8c8;}
.jgfangshi li a{width:84px; height:25px; display:block;font-weight:bold; text-decoration:none; color:#F33!important;}
.jgfangshi li a:hover{color:#7f2531!important;width:84px; height:25px; display:block; background-color:#ffffff; position:relative; z-index:4}
.jgfangshi li.curr3,.jgfangshi li.curr3 a{color:#7f2531!important;width:84px; height:25px; display:block; background-color:#ffffff; position:relative; z-index:4}
.jgfangshi li.line2{height:1px; width:234px; line-height:1px; font-size:1px; top:-1px; font-size:13px;
border:none;background:#c8c8c8;clear:both; position:relative; z-index:2;}
/**MK7 end**/
.jgfangshi ul{clear:both; margin:0 auto;}
</style>
转载请注明: 雨中无伞
/article/4827151.html
<div class="jgfangshi Lhk">
<ul class="jquser6" >
<li><a href="#">利好</a></li><li><a href="#">利空</a></li><li class="line2"> </li>
</ul>
</div><!--jgfangshi end-->
<div class="NR6-2">
<div class="list">
<ul>
<li><a href="#">需要控制一下字数</a></li>
<li><a href="#">阿胶权证又现“末日轮”炒作</a></li>
</ul>
</div><!--list end-->
</div><!--NR6-2 end-->
<div class="NR6-2">
<div class="list">
<ul>
<li><a href="#">阿胶权证又现“末日轮”炒作</a></li>
<li><a href="#">阿胶权证又现“末日轮”炒作</a></li>
</ul>
</div><!--list end-->
</div><!--NR6-2 end-->
<script type="text/javascript">
;(function($){
$.fn.extend({
'selItem':function(options){
options=$.extend({
curr_sel:'curr_class',
showHideClass:'class_name',
},options);
$('ul>li:first',this).addClass(options.curr_sel);
$(options.showHideClass).not( ':first' ).hide();
$( 'ul>li',this).unbind( 'click' ).bind( 'click', function(){
$(this).siblings('li').removeClass(options.curr_sel).end().addClass(options.curr_sel);
var index = $('ul>li').index($(this));
$(options.showHideClass).eq( index ).siblings(options.showHideClass).hide().end().show();
} );
return this;//返回this,使方法可链
}
})
})(jQuery);
$(function(){
$('.Lhk').selItem({
curr_sel:'curr3',
showHideClass:'.NR6-2'
});
})
</script>
<style>
body { text-align: center; font-family:"宋体", arial;margin:0; padding:0; font-size:12px; color:#000;}
div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border: 0; }
div{margin:0 auto;}
li{list-style-type:none;}
h1,h2,h3,h4,h5,h6 { margin:0; padding:0;font-size:12px; font-weight:normal;}
/* Link */
a{color: #000000 !important; text-decoration:none;}
a:visited {color: #83006f;text-decoration:none;}
a:hover {color: #bc2931; text-decoration:underline;}
a:active {color: #bc2931;}
/**MK2 start**/
.list{clear:both; margin-bottom:15px; width:234px;}
.list ul{padding:6px 0 0;}
.list li{text-align:left; line-height:20px; padding:0 0 0 11px; clear:both; background:url(../img/Fk1.jpg) 3px 7px no-repeat;}
.list .line{ border-top:1px dashed #ccc; height:4px; line-height:4px; font-size:4px;}
/**MK2 end**/
.jgfangshi{border:1px solid #c8c8c8; border-bottom:none; height:25px; line-height:25px; width:234px; font-size:12px; margin-top:30px;}
.jgfangshi li{ width:84px; height:25px; float:left;border-right:1px solid #c8c8c8;}
.jgfangshi li a{width:84px; height:25px; display:block;font-weight:bold; text-decoration:none; color:#F33!important;}
.jgfangshi li a:hover{color:#7f2531!important;width:84px; height:25px; display:block; background-color:#ffffff; position:relative; z-index:4}
.jgfangshi li.curr3,.jgfangshi li.curr3 a{color:#7f2531!important;width:84px; height:25px; display:block; background-color:#ffffff; position:relative; z-index:4}
.jgfangshi li.line2{height:1px; width:234px; line-height:1px; font-size:1px; top:-1px; font-size:13px;
border:none;background:#c8c8c8;clear:both; position:relative; z-index:2;}
/**MK7 end**/
.jgfangshi ul{clear:both; margin:0 auto;}
</style>
转载请注明: 雨中无伞
/article/4827151.html
相关文章推荐
- 自己动手编写的jquery插件,模仿搜狐汽车图片库展示效果
- 【原创】jQuery插件之图片轮播
- 用jQuery编写图片弹幕评论插件
- jQuery插件如何编写05_ 简单的全选反选插件(完整版)
- jquery插件编写和使用
- Jquery左右无缝图片滚动插件(原创)
- [原创+源码]超简单:基于jQuery实现的选项卡(滑动门)效果
- jQuery插件编写:Why use the Widget Factory(四)
- 举例说明jquery插件的编写方法
- jquery编写的,数据自动填充插件,实现页面和服务器端代码分离
- 基于jquery插件编写countdown计时器
- jQuery插件应用之 --- 选项卡插件的使用
- 编写超酷jQuery插件的10点建议
- ASP.NET jQuery 食谱13 (原创jQuery文本框字符限制插件-TextArea Counter)
- 编写JQuery插件
- 网友小宇分享原创网页向导Jquery插件wlGuide
- jQuery 选项卡插件 FengTab by FungLeo
- 编写自己的JQUERY插件
- 【原创】jQuery插件 - Booklet翻书特效教程(一) 一般设置
- 编写选项卡插件