2013. október 08., kedd 06:05

Tabs

Írta: 
Értékelés:
(0 szavazat)

Example tabs

Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

Extends tabbed navigation

This plugin extends the tabbed navigation component to add tabbable areas.

Usage

Enable tabbable tabs via JavaScript (each tab needs to be activated individually):

$('#myTab a').click(function (e) {
  e.preventDefault()
  $(this).tab('show')
})

You can activate individual tabs in several ways:

$('#myTab a[href="#profile"]').tab('show') // Select tab by name
$('#myTab a:first').tab('show') // Select first tab
$('#myTab a:last').tab('show') // Select last tab
$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)

Markup

You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the Bootstrap tab styling, while adding the nav and nav-pills classes will apply pill styling.

<!-- Nav tabs -->
<ul class="nav nav-tabs">
  <li><a href="#home" data-toggle="tab">Home</a></li>
  <li><a href="#profile" data-toggle="tab">Profile</a></li>
  <li><a href="#messages" data-toggle="tab">Messages</a></li>
  <li><a href="#settings" data-toggle="tab">Settings</a></li>
</ul>

<!-- Tab panes -->
<div class="tab-content">
  <div class="tab-pane active" id="home">...</div>
  <div class="tab-pane" id="profile">...</div>
  <div class="tab-pane" id="messages">...</div>
  <div class="tab-pane" id="settings">...</div>
</div>

Fade effect

To make tabs fade in, add .fade to each .tab-pane. The first tab pane must also have .in to properly fade in initial content.

<div class="tab-content">
  <div class="tab-pane fade in active" id="home">...</div>
  <div class="tab-pane fade" id="profile">...</div>
  <div class="tab-pane fade" id="messages">...</div>
  <div class="tab-pane fade" id="settings">...</div>
</div>

Methods

$().tab

Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM.

<ul class="nav nav-tabs" id="myTab">
  <li class="active"><a href="#home" data-toggle="tab">Home</a></li>
  <li><a href="#profile" data-toggle="tab">Profile</a></li>
  <li><a href="#messages" data-toggle="tab">Messages</a></li>
  <li><a href="#settings" data-toggle="tab">Settings</a></li>
</ul>

<div class="tab-content">
  <div class="tab-pane active" id="home">...</div>
  <div class="tab-pane" id="profile">...</div>
  <div class="tab-pane" id="messages">...</div>
  <div class="tab-pane" id="settings">...</div>
</div>

<script>
  $(function () {
    $('#myTab a:last').tab('show')
  })
</script>

Events

Event TypeDescription
show.bs.tab This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
shown.bs.tab This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
  e.target // activated tab
  e.relatedTarget // previous tab
})
Megjelent: 8005 alkalommal Utoljára frissítve: 2014. február 20., csütörtök 17:43
Strandétterem

Nunc a orci sagittis, bibendum nunc iaculis, luctus urna. Morbi elementum, lorem id venenatis posuere, nibh urna molestie eros, id vulputate quam arcu ut nunc. Quisque fermentum convallis dolor

Webhely: www.nootheme.com
Tovább a kategóriában: « Accordion Alert »

2033 hozzászólás

  • Hozzászólás hivatkozás Backlink Program 2021. május 21., péntek 17:19 Írta: Backlink Program

    Hi my family member! I wish to say that this
    article is amazing, great written and include almost all significant infos.
    I would like to see extra posts like this .

  • Hozzászólás hivatkozás GgongMoney 2021. május 21., péntek 12:17 Írta: GgongMoney

    Pretty great post. I simply stumbled upon your weblog and wanted
    to mention that I have truly enjoyed browsing your weblog posts.
    In any case I'll be subscribing for your rss feed and I'm hoping you write once more very soon!

  • Hozzászólás hivatkozás Baccarat 2021. május 20., csütörtök 18:53 Írta: Baccarat

    Hi, I would like to subscribe for this blog to obtain most recent updates, therefore where
    can i do it please help out.

  • Hozzászólás hivatkozás SEO Agency 2021. május 20., csütörtök 14:30 Írta: SEO Agency

    It's hard to come by well-informed people on this topic, but you sound like you know what
    you're talking about! Thanks

  • Hozzászólás hivatkozás IV Drip Treatment Las Vegas 2021. május 18., kedd 14:37 Írta: IV Drip Treatment Las Vegas

    Hey I know this is off topic but I was wondering if you knew of any widgets I could
    add to my blog that automatically tweet my newest twitter updates.
    I've been looking for a plug-in like this for quite some time and
    was hoping maybe you would have some experience with something like
    this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new
    updates.

  • Hozzászólás hivatkozás Bbs.Wmsjzj.Com 2021. május 18., kedd 10:31 Írta: Bbs.Wmsjzj.Com

    A fascinating discussion is worth comment.
    I do believe that you ought to write more on this subject matter, it might not be a
    taboo subject but typically people do not discuss such topics.
    To the next! Many thanks!!

  • Hozzászólás hivatkozás http://nagievonline.com 2021. május 18., kedd 01:54 Írta: http://nagievonline.com

    I pay a visit day-to-day a few web sites and information sites to read posts, however this web
    site presents feature based articles.

  • Hozzászólás hivatkozás adult friend finderr 2021. május 17., hétfő 23:58 Írta: adult friend finderr

    whoah this weblog is excellent i like studying your articles.
    Keep up the good work! You understand, lots of individuals are looking around for this information,
    you could aid them greatly.

  • Hozzászólás hivatkozás Baccarat 2021. május 17., hétfő 18:10 Írta: Baccarat

    Thank you a lot for sharing this with all of us
    you actually know what you're speaking about! Bookmarked.

    Please additionally discuss with my site =). We will have
    a link alternate arrangement among us

  • Hozzászólás hivatkozás Online Casino 2021. május 17., hétfő 01:37 Írta: Online Casino

    I've learn a few just right stuff here. Definitely price bookmarking for revisiting.

    I surprise how much attempt you place to create this type of magnificent
    informative site.

Új hozzászólás