Skip to content

Commit bfd711b

Browse files
Update README.MD
Updated Plugin description
1 parent cc45b69 commit bfd711b

File tree

1 file changed

+98
-2
lines changed

1 file changed

+98
-2
lines changed

README.md

+98-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,98 @@
1-
# pwstabs
2-
jQuery Tabs Plugin
1+
# PWS Tabs jQuery Plugin
2+
3+
jQuery Plugin to create tabs.
4+
5+
All you need to do is add few divs for your tabs, and script will generate Tabs for you.
6+
7+
## Demo
8+
9+
You can check out online demo at http://alexchizhov.com/pwstabs
10+
11+
12+
## Documentation
13+
14+
### Getting Started
15+
16+
All you really need to do is to create a DIV block, with DIV blocks in it and add DATA attributes.
17+
18+
1) Lets create main DIV:
19+
<pre><code>&lt;div class="hello_world"&gt;&lt;/div&gt;</code></pre>
20+
21+
<br>
22+
23+
2) Lets say we want 3 tabs, lets create three DIVs and add DATA attributes like so:
24+
<pre><code>&lt;div class="hello_world"&gt;
25+
26+
&lt;div data-pws-tab="anynameyouwant1" data-pws-tab-name="Tab Title 1"&gt;Our first tab&lt;/div&gt;
27+
&lt;div data-pws-tab="anynameyouwant2" data-pws-tab-name="Tab Title 2"&gt;Our second tab&lt;/div&gt;
28+
&lt;div data-pws-tab="anynameyouwant3" data-pws-tab-name="Tab Title 3"&gt;Our third tab&lt;/div&gt;
29+
30+
&lt;/div&gt;</code></pre>
31+
32+
33+
<strong>data-pws-tab</strong> is used to initiate the tab and as its ID.
34+
35+
<strong>data-pws-tab-name</strong> is used for a tab display name. Tabs are created automaticaly with this name!
36+
37+
38+
### Include Plugin Files
39+
40+
Just place plugins files into <strong>&lt;head&gt;</strong> section. <strong>Plugin requires jQuery!</strong>
41+
42+
<pre><code>&lt;!-- Include jQuery if needed --&gt;
43+
&lt;script src="//code.jquery.com/jquery-1.11.2.min.js"&gt;&lt;/script&gt;
44+
45+
&lt;link type="text/css" rel="stylesheet" href="jquery.pwstabs.css"&gt;
46+
&lt;script src="jquery.pwstabs-1.1.0.js"&gt;&lt;/script&gt;</code></pre>
47+
48+
49+
### Initiate Plugin
50+
51+
<pre><code>jQuery(document).ready(function($){
52+
$('#tabset0').pwstabs();
53+
});</code></pre>
54+
55+
56+
### Initiate Plugin With Options
57+
<pre><code>jQuery(document).ready(function($){
58+
$('.tabset1').pwstabs({
59+
effect: 'scale',
60+
defaultTab: 3,
61+
containerWidth: '600px'
62+
});
63+
});</code></pre>
64+
65+
66+
67+
### Options
68+
69+
<table>
70+
<thead>
71+
<tr>
72+
<th>Option</th>
73+
<th>Default</th>
74+
<th>Description</th>
75+
<th>Available options</th>
76+
</tr>
77+
</thead>
78+
<tbody>
79+
<tr>
80+
<td>effect</td>
81+
<td>scale</td>
82+
<td>Transition effect</td>
83+
<td>scale / slideleft / slideright / slidetop / slidedown</td>
84+
</tr>
85+
<tr>
86+
<td>defaultTab</td>
87+
<td>1</td>
88+
<td>Which tab is chosen by default</td>
89+
<td>Tab ID number starts with 1 (1,2,3..)</td>
90+
</tr>
91+
<tr>
92+
<td>containerWidth</td>
93+
<td>100%</td>
94+
<td>Tabs container width</td>
95+
<td>Any size value (1,2,3.. / px,pt,em,%,cm..)</td>
96+
</tr>
97+
</tbody>
98+
</table>

0 commit comments

Comments
 (0)