Search
× Search
mercredi 24 mai 2017
AccueilDraftFeaturesShort CodesTabs

Tabs

TABS

Tabs style 1

  • Tab 1
  • Tab 2
  • Tab 3
  • Tab 4
Content 1 Curabitur quis blandit ante. Morbi vel condimentum risus. Suspendisse elit massa, feugiat ut risus varius, dapibus sagittis nulla. Mauris dignissim elementum sem, a dignissim nibh tincidunt ac. Donec laoreet volutpat ligula, eu porttitor purus. Praesent a nulla quis justo gravida accumsan. Donec venenatis lacinia ornare.
Content 2 Nunc elit ante, laoreet lobortis ante non, aliquam euismod nisl. Nullam sagittis, sapien eu consequat auctor, tellus mi placerat orci, eget laoreet nisl turpis ac nunc. Ut rhoncus eros neque, nec volutpat orci tristique vel. Curabitur consequat lorem id magna rhoncus tristique. Vivamus vehicula placerat bibendum. Cras malesuada sit amet tellus eu vestibulum. Fusce bibendum nisi ullamcorper nisi tempus porttitor sed sed arcu. Vestibulum sed tempus ligula.
Content 3 Suspendisse convallis congue odio eu mattis. Nam eleifend felis nec tortor lacinia porta. In at lacinia enim. Nunc sed lacinia metus. Aliquam erat volutpat. Vestibulum volutpat scelerisque erat a vestibulum. Ut egestas pulvinar lorem at molestie. Proin sollicitudin diam a ipsum ultricies, in tincidunt libero lobortis. Cras rutrum tellus sit amet neque dignissim molestie quis quis est. Integer ac tempor leo. Maecenas nec condimentum metus. Fusce neque ante, posuere id tellus vitae, ultrices imperdiet massa.
Content 4 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum interdum tincidunt lorem pharetra sollicitudin. Aenean hendrerit ligula orci, eget placerat sem vulputate nec. Praesent non lectus sollicitudin, lobortis eros ac, auctor elit. Aliquam erat volutpat. Sed a mi sit amet nulla gravida ornare. In porta, erat id accumsan posuere, nisl augue adipiscing massa, nec varius nibh lacus sed risus.
View Code
<div class="eds_Tabs">
	<ul class="eds_tabsNav">
		<li class="edsTabulator_tabTrigger">Tab 1</li>
		<li class="edsTabulator_tabTrigger">Tab 2</li>
		<li class="edsTabulator_tabTrigger">Tab 3</li>
		<li class="edsTabulator_tabTrigger">Tab 4</li>
	</ul>
	<div class="edsTabulator_tabsWrapper">
		<div class="edsTabulator_tab">Tabb 1 Content</div>
		<div class="edsTabulator_tab">Tabb 2 Content</div>
		<div class="edsTabulator_tab">Tabb 3 Content</div>
		<div class="edsTabulator_tab">Tabb 4 Content</div>
	</div>
</div>

Tabs style 2

  • Tab 1
  • Tab 2
  • Tab 3
  • Tab 4
Content 1 Curabitur quis blandit ante. Morbi vel condimentum risus. Suspendisse elit massa, feugiat ut risus varius, dapibus sagittis nulla. Mauris dignissim elementum sem, a dignissim nibh tincidunt ac. Donec laoreet volutpat ligula, eu porttitor purus. Praesent a nulla quis justo gravida accumsan. Donec venenatis lacinia ornare.
Content 2 Nunc elit ante, laoreet lobortis ante non, aliquam euismod nisl. Nullam sagittis, sapien eu consequat auctor, tellus mi placerat orci, eget laoreet nisl turpis ac nunc. Ut rhoncus eros neque, nec volutpat orci tristique vel. Curabitur consequat lorem id magna rhoncus tristique. Vivamus vehicula placerat bibendum. Cras malesuada sit amet tellus eu vestibulum. Fusce bibendum nisi ullamcorper nisi tempus porttitor sed sed arcu. Vestibulum sed tempus ligula.
Content 3 Suspendisse convallis congue odio eu mattis. Nam eleifend felis nec tortor lacinia porta. In at lacinia enim. Nunc sed lacinia metus. Aliquam erat volutpat. Vestibulum volutpat scelerisque erat a vestibulum. Ut egestas pulvinar lorem at molestie. Proin sollicitudin diam a ipsum ultricies, in tincidunt libero lobortis. Cras rutrum tellus sit amet neque dignissim molestie quis quis est. Integer ac tempor leo. Maecenas nec condimentum metus. Fusce neque ante, posuere id tellus vitae, ultrices imperdiet massa.
Content 4 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum interdum tincidunt lorem pharetra sollicitudin. Aenean hendrerit ligula orci, eget placerat sem vulputate nec. Praesent non lectus sollicitudin, lobortis eros ac, auctor elit. Aliquam erat volutpat. Sed a mi sit amet nulla gravida ornare. In porta, erat id accumsan posuere, nisl augue adipiscing massa, nec varius nibh lacus sed risus.
View Code
<div class="eds_Tabs eds_Tabs2">
	<ul class="eds_tabsNav">
		<li class="edsTabulator_tabTrigger">Tab 1</li>
		<li class="edsTabulator_tabTrigger">Tab 2</li>
		<li class="edsTabulator_tabTrigger">Tab 3</li>
		<li class="edsTabulator_tabTrigger">Tab 4</li>
	</ul>
	<div class="edsTabulator_tabsWrapper">
		<div class="edsTabulator_tab">Tabb 1 Content</div>
		<div class="edsTabulator_tab">Tabb 2 Content</div>
		<div class="edsTabulator_tab">Tabb 3 Content</div>
		<div class="edsTabulator_tab">Tabb 4 Content</div>
	</div>
</div>

TOGGLABLE TABS

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.

View Code
<ul id="myTab" class="nav nav-tabs" role="tablist">
      <li class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
      <li><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
      <li class="dropdown">
        <a href="#" id="myTabDrop1" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
        <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1">
          <li><a href="#dropdown1" tabindex="-1" role="tab" data-toggle="tab">@fat</a></li>
          <li><a href="#dropdown2" tabindex="-1" role="tab" data-toggle="tab">@mdo</a></li>
        </ul>
      </li>
    </ul>
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane fade in active" id="home">
        <p>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.</p>
      </div>
      <div class="tab-pane fade" id="profile">
        <p>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.</p>
      </div>
      <div class="tab-pane fade" id="dropdown1">
        <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
      </div>
      <div class="tab-pane fade" id="dropdown2">
        <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
      </div>
    </div>
  

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" role="tablist">
  <li class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
  <li><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
  <li><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
  <li><a href="#settings" role="tab" 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" role="tablist" id="myTab">
  <li class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
  <li><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
  <li><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
  <li><a href="#settings" role="tab" 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 Type Description
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
})

Ils nous soutiennent

get social

>Qui sommes-nous ?
>La formation
>Être stagiaire
>Espace entreprises partenaires
>Nous rejoindre


Retour au début