Code Monkey home page Code Monkey logo

responsive.tabs.js's Introduction

responsive.tabs.js

支持响应式的Tab选项卡,并支持Accordion、Toggle切换效果。

具体效果如下: 支持响应式的Tab选项卡

引用文件

CSS

<link rel="stylesheet" type="text/css" href="css/responsive.tabs.css" />

JS

<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/responsive.tabs.js"></script>

HTML结构

<div class="tabs">
  	<ul class="tabs-list">
  		<li class="active"><a href="javascript:;">……</a></li>
  		<li><a href="javascript:;">……</a></li>
  	</ul>
    <div class="tabs-container">
      <div class="tab-content" style="display:block;">
        ……
      </div>
      <div class="tab-content">
        ……
      </div>
    </div>
</div>

插件调用

$('.tabs').respTabs();

参数

选项 类型 默认值 说明
startIndex number 0 默认显示第几个,从0开始
activeClass string 'active' 当前高亮的标识clss
model string 'tabs' 插件模式:tabs 或 accordions
responsive bool true 开启响应式,只在tabs模式有效
responsiveClass string 'responsive-tabs' 触发事件的类型,click 或 mouseover
fnEvent string 'click' 触发事件的类型,click 或 mouseover
toggles bool false 隐藏自身的切换,只在accordions模式有效
hidenContent bool false 默认隐藏Accordions内容,只在accordions模式有效

兼容性

Chrome、Firefox、IE6+。(如果使用响应式,需支持CSS3 @media的浏览器)

更新说明

--- v1.0.1 (15.12.27) ---

增加水平方向左右的Tabs选项卡

修复响应式Tabs点击切换时没有高亮对应的选项卡项。

协议

MIT

responsive.tabs.js's People

Contributors

sufangyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.