1- # jQuery Smart Tab v3
1+ # jQuery Smart Tab v4
22#### The flexible jQuery tab control plugin
33
44[ ![ Build Status] ( https://travis-ci.org/techlab/jquery-smarttab.svg?branch=master )] ( https://travis-ci.org/techlab/jquery-smarttab )
55[ ![ npm version] ( https://badge.fury.io/js/jquery-smarttab.svg )] ( https://badge.fury.io/js/jquery-smarttab )
66[ ![ Latest Stable Version] ( https://poser.pugx.org/techlab/jquery-smarttab/v/stable )] ( https://packagist.org/packages/techlab/jquery-smarttab )
77[ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://raw.githubusercontent.com/techlab/jquery-smarttab/master/LICENSE )
8+ [ ![ GitHub Sponsor] ( https://img.shields.io/badge/Sponsor-techlab-blue.svg?logo=github )] ( https://github.com/sponsors/techlab )
89[ ![ Donate on Paypal] ( https://img.shields.io/badge/PayPal-dipuraj-blue.svg )] ( https://www.paypal.me/dipuraj )
910
1011Smart Tab is a flexible and heavily customizable ** jQuery Tab control plugin** .
@@ -19,23 +20,25 @@ Smart Tab is a flexible and heavily customizable **jQuery Tab control plugin**.
1920
2021Demos
2122-----
22- + [ Basic Example] ( http://techlaboratory.net/projects/demo/jquery-smart-tab/v3 )
23- + [ Ajax Contents] ( http://techlaboratory.net/projects/demo/jquery-smart-tab/v3/ajax )
24- + [ Multiple Tabs] ( http://techlaboratory.net/projects/demo/jquery-smart-tab/v3/multiple )
23+ + [ Basic Example] ( http://techlaboratory.net/projects/demo/jquery-smart-tab/v4 )
24+ + [ Ajax Contents] ( http://techlaboratory.net/projects/demo/jquery-smart-tab/v4/ajax )
25+ + [ Multiple Tabs] ( http://techlaboratory.net/projects/demo/jquery-smart-tab/v4/multiple )
26+ + [ Vertical Tab Layout] ( http://techlaboratory.net/projects/demo/jquery-smart-tab/v4/vertical )
27+ + [ Bootstrap Modal Example] ( http://techlaboratory.net/projects/demo/jquery-smart-tab/v4/bootstrap-modal )
2528
2629Screenshots
2730-----
28- ![ jQuery Smart Tab default ] ( http ://techlaboratory.net/assets/media/jquery-smart-tab/smarttab-v3-default.png )
31+ ![ jQuery Smart Tab] ( https ://techlaboratory.net/assets/media/jquery-smart-tab/v4/st-v4-basic.gif )
2932
30- ![ jQuery Smart Tab dark ] ( http ://techlaboratory.net/assets/media/jquery-smart-tab/smarttab-v3-dark .png)
33+ ![ jQuery Smart Tab] ( https ://techlaboratory.net/assets/media/jquery-smart-tab/v4/st-v6-brick .png)
3134
32- ![ jQuery Smart Tab tabs ] ( http ://techlaboratory.net/assets/media/jquery-smart-tab/smarttab-v3-tabs .png)
35+ ![ jQuery Smart Tab] ( https ://techlaboratory.net/assets/media/jquery-smart-tab/v4/st-v6-basic .png)
3336
34- ![ jQuery Smart Tab brick ] ( http ://techlaboratory.net/assets/media/jquery-smart-tab/smarttab-v3-brick .png)
37+ ![ jQuery Smart Tab] ( https ://techlaboratory.net/assets/media/jquery-smart-tab/v4/st-v6-pills .png)
3538
3639Requirements
3740-----
38- + [ jQuery] ( http://jquery.com/ ) (supports from jQuery- 1.11.1+ to the latest jQuery-3.5.0 )
41+ + [ jQuery] ( http://jquery.com/ ) (supports jQuery 1.11.1+ to jQuery 3.6+ and jQuery Slim versions )
3942
4043Installation
4144-----
@@ -46,49 +49,79 @@ Installation
4649### [ Yarn] ( https://yarn.pm/jquery-smarttab )
4750 yarn add jquery-smarttab
4851
49- ### [ Composer] ( https://packagist.org/packages/techlab/jquery-smarttab )
50- composer require techlab/jquery-smarttab
51-
5252### [ CDN - jsDelivr] ( https://www.jsdelivr.com/package/npm/jquery-smarttab )
5353``` html
5454<!-- CSS -->
55- <link href =" https://cdn.jsdelivr.net/npm/jquery-smarttab@3.1.1 /dist/css/smart_tab_all.min.css" rel =" stylesheet" type =" text/css" />
55+ <link href =" https://cdn.jsdelivr.net/npm/jquery-smarttab@4 /dist/css/smart_tab_all.min.css" rel =" stylesheet" type =" text/css" />
5656
5757<!-- JavaScript -->
58- <script src =" https://cdn.jsdelivr.net/npm/jquery-smarttab@3.1.1 /dist/js/jquery.smartTab.min.js" type =" text/javascript" ></script >
58+ <script src =" https://cdn.jsdelivr.net/npm/jquery-smarttab@4 /dist/js/jquery.smartTab.min.js" type =" text/javascript" ></script >
5959```
6060
6161### [ CDN - UNPKG] ( https://unpkg.com/browse/jquery-smarttab/ )
6262``` html
6363<!-- CSS -->
64- <link href =" https://unpkg.com/jquery-smarttab@3.1.1 /dist/css/smart_tab_all.min.css" rel =" stylesheet" type =" text/css" />
64+ <link href =" https://unpkg.com/jquery-smarttab@4 /dist/css/smart_tab_all.min.css" rel =" stylesheet" type =" text/css" />
6565
6666<!-- JavaScript -->
67- <script src =" https://unpkg.com/jquery-smarttab@3.1.1/dist/js/jquery.smartTab.min.js" type =" text/javascript" ></script >
67+ <script src =" https://unpkg.com/jquery-smarttab@4/dist/js/jquery.smartTab.min.js" type =" text/javascript" ></script >
68+ ```
69+
70+ ### Common JS/Webpack
71+ ``` js
72+ var $ = require (" jquery" );
73+ require ( " jquery-smarttab/dist/css/smart_tab_all.css" );
74+ const smartTab = require (" jquery-smarttab" );
75+
76+ $ (function () {
77+ $ (' #smarttab' ).smartTab ();
78+ });
79+ ```
80+ ### ES6/Babel
81+ ``` js
82+ import $ from " jquery" ;
83+ import " jquery-smarttab/dist/css/smart_tab_all.css" ;
84+ import smartTab from ' jquery-smarttab' ;
85+
86+ $ (function () {
87+ $ (' #smarttab' ).smartTab ();
88+ });
89+ ```
90+
91+ #### Note: you may have to install the required dependencies
92+ ``` bash
93+ npm i jquery
94+ npm i jquery-smarttab
95+
96+ // If you are using Webpack, install
97+ npm i webpack webpack-cli style-loader css-loader --save-dev
6898```
6999
70100### Download
71101#### [ Download from GitHub] ( https://github.com/techlab/jquery-smarttab/archive/master.zip )
72102
73103Features
74104-----
75-
76- + Responsive design
77- + Standalone CSS
78- + Bootstrap compatible
79- + Various themes included
80- + Customizable CSS
81- + Cool transition animations (fade/slide-horizontal/slide-vertical/slide-swing)
82- + URL navigation and tab selection
83- + Compatible with all jQuery versions (jQuery 1.11.1+, jQuery 2+, jQuery 3.5+)
84- + Auto content height adjustment
85- + Auto Progress (automatic navigation of tabs)
86- + Ajax content loading support
87- + Keyboard navigation
88- + External anchor support
89- + Custom events
90- + Supports all modern browsers
91- + Easy to implement and minimal HTML required
105+ - Easy to implement and minimal HTML required
106+ - Supports all modern browsers
107+ - Responsive CSS design
108+ - Bootstrap compatible
109+ - Cool themes included and can be easly customize
110+ - Easy color cusomization using CSS variables
111+ - Built-in transition animations (none|fade|slideHorizontal|slideVertical|slideSwing|css)
112+ - Transition animations can be added easly by extending
113+ - CSS Animations support for transition animations (Supports [ Animate.css] ( https://animate.style/ ) )
114+ - Accessible controls
115+ - External controls support
116+ - Easy ajax content integration
117+ - Keyboard navigation
118+ - Auto content height adjustment
119+ - Buit-in loader
120+ - Buit-in events
121+ - UMD (Universal Module Definition) support
122+ - Compatible with all jQuery versions (jQuery 1.11.1+, jQuery 3.6+, and jQuery Slim)
123+ - URL navigation and tab selection
124+ - Auto Progress (automatic navigation of tabs)
92125
93126Usage
94127-----
@@ -150,15 +183,11 @@ Include jQuery SmartTab JavaScript
150183<script type =" text/javascript" src =" ../dist/js/jquery.smartTab.min.js" ></script >
151184```
152185Initialize the jQuery SmartTab
153- ``` html
154- <script type =" text/javascript" >
155- $ (document ).ready (function (){
156-
157- // SmartTab initialize
158- $ (' #smarttab' ).smartTab ();
159-
160- });
161- </script >
186+ ``` js
187+ $ (function () {
188+ // SmartTab initialize
189+ $ (' #smarttab' ).smartTab ();
190+ });
162191```
163192That's it!
164193
@@ -169,27 +198,46 @@ Please see the [documentation](http://techlaboratory.net/jquery-smarttab#documen
169198// SmartTab initialize
170199$ (' #smarttab' ).smartTab ({
171200 selected: 0 , // Initial selected tab, 0 = first tab
172- theme: ' default' , // theme for the tab, related css need to include for other than default theme
173- orientation: ' horizontal' , // Nav menu orientation. horizontal/vertical
201+ theme: ' basic' , // theme, related css need to include for other than default theme
174202 justified: true , // Nav menu justification. true/false
175203 autoAdjustHeight: true , // Automatically adjust content height
176204 backButtonSupport: true , // Enable the back button support
177- enableURLhash : true , // Enable selection of the tab based on url hash
205+ enableUrlHash : true , // Enable selection of the step based on url hash
178206 transition: {
179- animation: ' none' , // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
180- speed: ' 400' , // Transion animation speed
181- easing: ' ' // Transition animation easing. Not supported without a jQuery easing plugin
207+ animation: ' none' , // Animation effect on navigation, none|fade|slideHorizontal|slideVertical|slideSwing|css(Animation CSS class also need to specify)
208+ speed: ' 400' , // Animation speed. Not used if animation is 'css'
209+ easing: ' ' , // Animation easing. Not supported without a jQuery easing plugin. Not used if animation is 'css'
210+ prefixCss: ' ' , // Only used if animation is 'css'. Animation CSS prefix
211+ fwdShowCss: ' ' , // Only used if animation is 'css'. Step show Animation CSS on forward direction
212+ fwdHideCss: ' ' , // Only used if animation is 'css'. Step hide Animation CSS on forward direction
213+ bckShowCss: ' ' , // Only used if animation is 'css'. Step show Animation CSS on backward direction
214+ bckHideCss: ' ' , // Only used if animation is 'css'. Step hide Animation CSS on backward direction
182215 },
183216 autoProgress: { // Auto navigate tabs on interval
184217 enabled: false , // Enable/Disable Auto navigation
185218 interval: 3500 , // Auto navigate Interval (used only if "autoProgress" is enabled)
186219 stopOnFocus: true , // Stop auto navigation on focus and resume on outfocus
187220 },
188- keyboardSettings : {
221+ keyboard : {
189222 keyNavigation: true , // Enable/Disable keyboard navigation(left and right keys are used if enabled)
190- keyLeft: [37 ], // Left key code
191- keyRight: [39 ] // Right key code
192- }
223+ keyLeft: [37 , 38 ], // Left key code
224+ keyRight: [39 , 40 ], // Right key code
225+ keyHome: [36 ], // Home key code
226+ keyEnd: [35 ] // End key code
227+ },
228+ style: { // CSS Class settings
229+ mainCss: ' st' ,
230+ navCss: ' nav' ,
231+ navLinkCss: ' nav-link' ,
232+ contentCss: ' tab-content' ,
233+ contentPanelCss: ' tab-pane' ,
234+ themePrefixCss: ' st-theme-' ,
235+ justifiedCss: ' st-justified' ,
236+ anchorDefaultCss: ' default' ,
237+ anchorActiveCss: ' active' ,
238+ loaderCss: ' st-loading'
239+ },
240+ getContent: null
193241});
194242```
195243
@@ -201,6 +249,8 @@ Contribute
201249----
202250If you like the project please support with your contribution.
203251
252+ [ GitHub Sponsor] ( https://github.com/sponsors/techlab )
204253[ Donate on Paypal] ( https://www.paypal.me/dipuraj )
205254
206- Thank you and Happy Coding!
255+ Happy Coding :heart :
256+
0 commit comments