Code Monkey home page Code Monkey logo

bootstrap-tabdrop's Introduction

bootstrap-tabdrop

A dropdown tab tool for @twitter bootstrap forked from Stefan Petre's (of eyecon.ro), improvements by @jschab and @josephdburdick

The dropdown tab appears when your tabs do not all fit in the same row.

Original site and examples: http://www.eyecon.ro/bootstrap-tabdrop/

Added functionality: Displays the text of an active tab selected from the dropdown list instead of the text option on the dropdown tab (improved).

Added functionality: Allows customizable offset to determine whether tab is overflown or not.

Requirements

Example

No additional HTML needed - the script adds it when the dropdown tab is needed. It also supports tabs that have display: flex.

Direct javascript:

this.$('.nav-tabs').tabdrop();

Use

Call the tabdrop:

.tabdrop();

Call the tabdrop with options:

.tabdrop(options);

Options

text

Type: string

Default: icon

<i class="icon-align-justify"></i>

To change the default value, call

.tabdrop({text: "your text here"});

when initalizing the tabdrop. The displayed value will change when a tab is selected from the dropdown list.

align

Type: string

Default: right

$('.nav-tabs').tabdrop({align: 'left'});

when initalizing the tabdrop. The tab will align on the left or right. This addresses issues with tabs that have display: flex.

offsetTop

Type: integer

Default: 0

To change the default value, call

.tabdrop({offsetTop: N});

when initalizing the tabdrop. This determines when tab has to be included in the dropdown.

Methods

layout

Checks to see if the tabs all fit in one row and displays the text of an active tab in the list:

.tabdrop('layout');

bootstrap-tabdrop's People

Contributors

jaarandaz avatar jmschabdach avatar josephdburdick avatar jschab avatar payalcsureja avatar schabdachj avatar steven-prybylynskyi avatar

Watchers

 avatar  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.