;(function($){

$.fn.tabso=function( options ){

   var opts=$.extend({},$.fn.tabso.defaults,options );

   return this.each(function(i){
var _this=$(this);
var $menus=_this.children( opts.menuChildSel );
var $container=$( opts.cntSelect ).eq(i); if( !$container) return; if( opts.tabStyle=="move"||opts.tabStyle=="move-fade"||opts.tabStyle=="move-animate" ){
var step=0;
if( opts.direction=="left"){
step=$container.children().children( opts.cntChildSel ).outerWidth(true);
}else{
step=$container.children().children( opts.cntChildSel ).outerHeight(true);
}
} if( opts.tabStyle=="move-animate" ){ var animateArgu=new Object(); } $menus[ opts.tabEvent]( function(){
var index=$menus.index( $(this) );
$( this).addClass( opts.onStyle )
.siblings().removeClass( opts.onStyle );
switch( opts.tabStyle ){
case "fade":
if( !($container.children( opts.cntChildSel ).eq( index ).is(":animated")) ){
$container.children( opts.cntChildSel ).eq( index ).siblings().css( "display", "none")
.end().stop( true, true ).fadeIn( opts.aniSpeed );
}
break;
case "move":
$container.children( opts.cntChildSel ).css(opts.direction,-step*index+"px");
break;
case "move-fade":
if( $container.children( opts.cntChildSel ).css(opts.direction)==-step*index+"px" ) break;
$container.children( opts.cntChildSel ).stop(true).css("opacity",0).css(opts.direction,-step*index+"px").animate( {"opacity":1},opts.aniSpeed );
break;
case "move-animate":
animateArgu[opts.direction]=-step*index+"px";
$container.children( opts.cntChildSel ).stop(true).animate( animateArgu,opts.aniSpeed,opts.aniMethod );
break;
default:
$container.children( opts.cntChildSel ).eq( index ).css( "display", "block")
.siblings().css( "display","none" );
} }); $menus.eq(0)[ opts.tabEvent ](); });
}; $.fn.tabso.defaults={
cntSelect : ".content_wrap",
tabEvent : "mouseover_on",
tabStyle : "normal",
direction : "top",
aniMethod : "swing",
aniSpeed : "fast",
onStyle : "current",
menuChildSel : "*",
cntChildSel : "*"
}; })(jQuery);
<!--tab选项卡开始-->
<div class="orders-tab color_8e flaot_left">
<ul class="tabbtn" id="orders-normaltab">
<li class="current current-left" id="orders-current"></li>
<li>借物 <span>[3]</span></li>
<li>售卖其他产品</li>
<li>发票信息</li>
</ul><!--tabbtn end-->
<div class="tabcon flaot_left" id="normalcon">
<div class="sublist sublist-orders-remark">
<div class="orders-remark">
<textarea class="orders-remark-main"></textarea>
</div>
</div><!--tabcon end-->
<div class="sublist"> </div><!--tabcon end-->
												

各种效果的tab选项卡的更多相关文章

  1. 下拉菜单效果和tab选项卡切换

    //下拉菜单效果和tab选项卡切换. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " ...

  2. 基于HTML5 Tab选项卡动画切换特效

    基于HTML5 Tab选项卡动画切换特效.这是一款基于HTML5+CSS3实现的带有动画切换效果的Tab选项卡插件cbpFWTabs.效果图如下: 在线预览   源码下载 实现的代码. html代码: ...

  3. 纯js实现网页tab选项卡切换效果

    纯js实现网页tab选项卡切换效果 百度搜索     js 点击菜单项就可以切换内容的效果

  4. vue实现tab选项卡切换效果

    tab选项卡切换效果: 通过点击事件传入参数,然后通过v-show来进行切换显示 <template> <div class="box"> <div ...

  5. tab选项卡不同样式的效果

    一般的tab选项卡就只能两种样式,一种是选中或者是划过这个选项卡样式,一种是没选中或者没划过选项卡样式. 现在有这种需求,就是选中或划过tab选卡要不同样式.比如tab1选中或者划过是红色,tab2选 ...

  6. 可轮播滚动的Tab选项卡

    前段时间有试着搭建个后台主题ui框架,有用到可支持滚动的Tab选项卡,模仿着H+后台主题ui框架中的代码造轮子改造了下,可惜代码在公司,不能把代码外发出来(感觉这样被限制了很多,对于这样的公司没办法, ...

  7. android tab选项卡的使用

    项目做完了,写写博客,在项目中遇到的一些问题,或者是自己觉得很不错的东西.这一篇主要是想和大家分享一下我在项目中封装的一个东西,就是tab选项卡.先看看效果图: 我在网上看了很多有关选项卡的demo, ...

  8. :target伪类制作tab选项卡

    :target伪类的作用是突出显示活动的HTML锚,下面是一个简单的例子: HTML代码: <div> <a href="#demo1">点击此处</ ...

  9. 工作当中实际运用(1)——tab选项卡

    不废话 直接上代码: tab选项卡 window.onload=function(){ var titles= document.getElementById('header-dh').getElem ...

随机推荐

  1. 将IIS 7,IIS 8运行在32位

    win2008及win2012的IIS运行在32状态下,原因是ASP程序必须在32位下才能使用ACCESS, 只有在32位下,myodbc才会正常,注意,MySQL必须用32位版本. 设置办法: 打开 ...

  2. zabbix自动发现监控url

    1.在监控客户机上 web_site_code_status.sh: #!/bin/bash UrlFile="/opt/scripts/WEB.txt" IFS=$'\n' we ...

  3. php +html5 websocket 聊天室

    针对内容比较长出错,修改后的解码函数 和 加码函数 原文请看上一篇 http://yixun.yxsss.com/yw3104.html function uncode($str,$key){ $ma ...

  4. enum使用

    新建一个.h文件 typedef enum { type1 = 1, type2 = 2 };

  5. PRML读书笔记——2 Probability Distributions

    2.1. Binary Variables 1. Bernoulli distribution, p(x = 1|µ) = µ 2.Binomial distribution + 3.beta dis ...

  6. 用JS来控制 div的高度随浏览器变化而变化

    <div id="test" style=" border: solid 1px #f00; "></div> <script t ...

  7. .net mvc onexception capture; redirectresult;

    need to set filtercontext.result=new redirectresult('linkcustompage'); done. so... ASP.NET MVC异常处理模块 ...

  8. SQL中插入单引号,新增修改删除

    1.插入单引号如果不转化的话,字符串插入到数据库中错误的,只要在字符串中有单引号的地方在加一个单引号即可.    例如:在数据库插入'井下设备' :    insert into Static_Bel ...

  9. ubuntu登陆出现问题

    手贱改了用户root权限结果登陆时提示system administrator is not allowed to login from this screen(郁闷勒) 这时可以按ctrl+F2进入 ...

  10. CSS 笔记一(Selectors/ Backgrounds/ Borders/ Margins/ Padding/ Height and Width)

    Selectors/ Backgrounds/ Borders/ Margins/ Padding/ Height and Width CSS Introduction: CSS stands for ...