@@ -7,14 +7,15 @@ Dependencies
77------------
88 - jQuery
99 - html structure where you have
10- - - tabs with a tab class (default: .tab, change selector in options)
11- - - content with content class (default: .tab-content, change cselector in options)
12- - - data-tab attributes in each that has the unique signifier for the pair
10+ - tabs with a tab class (default: .tab, change selector in options)
11+ - content with content class (default: .tab-content, change cselector in options)
12+ - data-tab attributes in each that has the unique signifier for the pair
1313
1414Usage
1515-----
1616
17- Example:
17+ HTML:
18+ ```
1819 <div class="tab-container">
1920 <div class="tabs">
2021 <div class="tab selected" data-tab="uniquesignifierforthepair"></div>
@@ -25,7 +26,20 @@ Example:
2526 <div class="tab-content" data-tab="otheruniquesignifierforthepair"></div>
2627 </div>
2728 </div>
29+ ```
2830
29- <script >
30- $ (' .tab-container' ).tabs ();
31- </script >
31+ Initialize in JavaScript
32+ ```
33+ // without config
34+ $('.tab-container').tabs();
35+
36+ // with custom config values
37+ $('.tab-container').tabs({
38+ selector : '.tab',
39+ cselector: '.tab-content',
40+ activeClass: 'selected',
41+ callback: function(e,ident){
42+ console.log(e, 'was clicked, currently selected:', ident);
43+ }
44+ });
45+ ```
0 commit comments