File tree 1 file changed +32
-6
lines changed
1 file changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,36 @@ Installation
70
70
<script src =" https://unpkg.com/smartwizard@6/dist/js/jquery.smartWizard.min.js" type =" text/javascript" ></script >
71
71
```
72
72
73
+ ### Common JS/Webpack
74
+ ``` js
75
+ var $ = require ( " jquery" );
76
+ require ( " smartwizard/dist/css/smart_wizard_all.css" );
77
+ const smartWizard = require (" smartwizard" );
78
+
79
+ $ (function () {
80
+ $ (' #smartwizard' ).smartWizard ();
81
+ });
82
+ ```
83
+ ### ES6/Babel
84
+ ``` js
85
+ import $ from " jquery" ;
86
+ import " smartwizard/dist/css/smart_wizard_all.css" ;
87
+ import smartWizard from ' smartwizard' ;
88
+
89
+ $ (function () {
90
+ $ (' #smartwizard' ).smartWizard ();
91
+ });
92
+ ```
93
+
94
+ #### Note: you may have to install the required dependencies
95
+ ``` bash
96
+ npm i jquery
97
+ npm i smartwizard
98
+
99
+ // If you are using Webpack, install
100
+ npm i webpack webpack-cli style-loader css-loader --save-dev
101
+ ```
102
+
73
103
### Download
74
104
#### [ Download from GitHub] ( https://github.com/techlab/jquery-smartwizard/archive/master.zip )
75
105
@@ -169,14 +199,10 @@ Include SmartWizard plugin JavaScript
169
199
<script src =" https://cdn.jsdelivr.net/npm/smartwizard@6/dist/js/jquery.smartWizard.min.js" type =" text/javascript" ></script >
170
200
```
171
201
Initialize the SmartWizard
172
- ``` html
173
- <script type =" text/javascript" >
174
- $ (document ).ready (function () {
175
-
202
+ ``` js
203
+ $ (function () {
176
204
$ (' #smartwizard' ).smartWizard ();
177
-
178
205
});
179
- </script >
180
206
```
181
207
That's it!
182
208
You can’t perform that action at this time.
0 commit comments