Skip to content

Commit 5f54407

Browse files
committed
Add a demostration for option "active"
1 parent f79519b commit 5f54407

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,24 @@ <h2>Default</h2>
8484
<div id='tab-3'><h3>Tab 3</h3></div>
8585
</div>
8686
</article>
87+
<article>
88+
<h2>Active</h2>
89+
<pre data-language="javascript">
90+
$('.tabs').tabslet({
91+
active: 2
92+
});
93+
</pre>
94+
<div class='tabs tabs_active'>
95+
<ul class='horizontal'>
96+
<li><a href="#tab-1">tab</a></li>
97+
<li><a href="#tab-2">information</a></li>
98+
<li><a href="#tab-3">tab</a></li>
99+
</ul>
100+
<div id='tab-1'><h3>Tab 1</h3></div>
101+
<div id='tab-2'><h3>The second tab is active when page loads.</h3></div>
102+
<div id='tab-3'><h3>Tab 3</h3></div>
103+
</div>
104+
</article>
87105
<article>
88106
<h2>Hover</h2>
89107
<pre data-language="javascript">

javascripts/initializers.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ $(document).ready(function() {
55

66
$('.tabs_default').tabslet();
77

8+
$('.tabs_active').tabslet({
9+
active: 2
10+
});
11+
812
$('.tabs_hover').tabslet({
913
mouseevent: 'hover',
1014
attribute: 'href',

0 commit comments

Comments
 (0)