index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Smart Wizard - a JavaScript jQuery Step Wizard plugin</title>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <!-- Include Bootstrap CSS -->
  8. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
  9. <!-- Optional Bootstrap Theme -->
  10. <link rel="stylesheet" href="../dist/css/bootstrap.min.css">
  11. <!-- Include SmartWizard CSS -->
  12. <link href="../dist/css/smart_wizard.css" rel="stylesheet" type="text/css" />
  13. <!-- Optional SmartWizard theme -->
  14. <link href="../dist/css/smart_wizard_theme_circles.css" rel="stylesheet" type="text/css" />
  15. <link href="../dist/css/smart_wizard_theme_arrows.css" rel="stylesheet" type="text/css" />
  16. <link href="../dist/css/smart_wizard_theme_dots.css" rel="stylesheet" type="text/css" />
  17. </head>
  18. <body>
  19. <div class="container">
  20. <form class="form-inline">
  21. <label class="mr-sm-2">Choose Theme:</label>
  22. <select id="theme_selector" class="custom-select mb-2 mr-sm-2 mb-sm-0">
  23. <option value="default">default</option>
  24. <option value="arrows">arrows</option>
  25. <option value="circles">circles</option>
  26. <option value="dots">dots</option>
  27. </select>
  28. <label class="mr-sm-2">External Buttons:</label>
  29. <div class="btn-group" role="group">
  30. <button class="btn btn-secondary" id="prev-btn" type="button">Go Previous</button>
  31. <button class="btn btn-secondary" id="next-btn" type="button">Go Next</button>
  32. <button class="btn btn-danger" id="reset-btn" type="button">Reset Wizard</button>
  33. </div>
  34. </form>
  35. <br />
  36. <!-- SmartWizard html -->
  37. <div id="smartwizard">
  38. <ul>
  39. <li><a href="#step-1">Step 1<br /><small>This is step description</small></a></li>
  40. <li><a href="#step-2">Step 2<br /><small>This is step description</small></a></li>
  41. <li><a href="#step-3">Step 3<br /><small>This is step description</small></a></li>
  42. <li><a href="#step-4">Step 4<br /><small>This is step description</small></a></li>
  43. </ul>
  44. <div>
  45. <div id="step-1" class="">
  46. <h2>Step 1 Content</h2>
  47. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  48. </div>
  49. <div id="step-2" class="">
  50. <h2>Step 2 Content</h2>
  51. <div>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div>
  52. </div>
  53. <div id="step-3" class="">
  54. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  55. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  56. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  57. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  58. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  59. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  60. </div>
  61. <div id="step-4" class="">
  62. <h2>Step 4 Content</h2>
  63. <div class="card">
  64. <div class="card-header">My Details</div>
  65. <div class="card-block p-0">
  66. <table class="table">
  67. <tbody>
  68. <tr> <th>Name:</th> <td>Tim Smith</td> </tr>
  69. <tr> <th>Email:</th> <td>example@example.com</td> </tr>
  70. </tbody>
  71. </table>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <!-- Include jQuery -->
  79. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  80. <!-- Include SmartWizard JavaScript source -->
  81. <script type="text/javascript" src="../dist/js/jquery.smartWizard.min.js"></script>
  82. <script type="text/javascript">
  83. $(document).ready(function(){
  84. // Step show event
  85. $("#smartwizard").on("showStep", function(e, anchorObject, stepNumber, stepDirection, stepPosition) {
  86. //alert("You are on step "+stepNumber+" now");
  87. if(stepPosition === 'first'){
  88. $("#prev-btn").addClass('disabled');
  89. }else if(stepPosition === 'final'){
  90. $("#next-btn").addClass('disabled');
  91. }else{
  92. $("#prev-btn").removeClass('disabled');
  93. $("#next-btn").removeClass('disabled');
  94. }
  95. });
  96. // Toolbar extra buttons
  97. var btnFinish = $('<button></button>').text('Finish')
  98. .addClass('btn btn-info')
  99. .on('click', function(){ alert('Finish Clicked'); });
  100. var btnCancel = $('<button></button>').text('Cancel')
  101. .addClass('btn btn-danger')
  102. .on('click', function(){ $('#smartwizard').smartWizard("reset"); });
  103. // Smart Wizard
  104. $('#smartwizard').smartWizard({
  105. selected: 0,
  106. theme: 'default',
  107. transitionEffect:'fade',
  108. showStepURLhash: true,
  109. toolbarSettings: {toolbarPosition: 'both',
  110. toolbarExtraButtons: [btnFinish, btnCancel]
  111. }
  112. });
  113. // External Button Events
  114. $("#reset-btn").on("click", function() {
  115. // Reset wizard
  116. $('#smartwizard').smartWizard("reset");
  117. return true;
  118. });
  119. $("#prev-btn").on("click", function() {
  120. // Navigate previous
  121. $('#smartwizard').smartWizard("prev");
  122. return true;
  123. });
  124. $("#next-btn").on("click", function() {
  125. // Navigate next
  126. $('#smartwizard').smartWizard("next");
  127. return true;
  128. });
  129. $("#theme_selector").on("change", function() {
  130. // Change theme
  131. $('#smartwizard').smartWizard("theme", $(this).val());
  132. return true;
  133. });
  134. // Set selected theme on page refresh
  135. $("#theme_selector").change();
  136. });
  137. </script>
  138. </body>
  139. </html>