File tree Expand file tree Collapse file tree 1 file changed +32
-6
lines changed Expand file tree Collapse file tree 1 file changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,36 @@ Installation
7070<script src =" https://unpkg.com/smartwizard@6/dist/js/jquery.smartWizard.min.js" type =" text/javascript" ></script >
7171```
7272
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+
73103### Download
74104#### [ Download from GitHub] ( https://github.com/techlab/jquery-smartwizard/archive/master.zip )
75105
@@ -169,14 +199,10 @@ Include SmartWizard plugin JavaScript
169199<script src =" https://cdn.jsdelivr.net/npm/smartwizard@6/dist/js/jquery.smartWizard.min.js" type =" text/javascript" ></script >
170200```
171201Initialize the SmartWizard
172- ``` html
173- <script type =" text/javascript" >
174- $ (document ).ready (function () {
175-
202+ ``` js
203+ $ (function () {
176204 $ (' #smartwizard' ).smartWizard ();
177-
178205});
179- </script >
180206```
181207That's it!
182208
You can’t perform that action at this time.
0 commit comments