234 lines
11 KiB
HTML
234 lines
11 KiB
HTML
|
<!doctype html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>jQuery Smart Wizard - The awesome jQuery step wizard plugin</title>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||
|
|
||
|
<!-- Include SmartWizard CSS -->
|
||
|
<link href="./css/smart_wizard_all.css" rel="stylesheet" type="text/css" />
|
||
|
|
||
|
<!-- Demo Page Style - You don't need -->
|
||
|
<style>
|
||
|
body {
|
||
|
padding-right: 5%;
|
||
|
padding-left: 5%;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<br />
|
||
|
<p>
|
||
|
<label>Theme:</label>
|
||
|
<select id="theme_selector">
|
||
|
<option value="default">Default</option>
|
||
|
<option value="arrows" selected>Arrows</option>
|
||
|
<option value="dots">Dots</option>
|
||
|
<option value="progress">Progress</option>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<input type="checkbox" id="dark_mode" value="1" />
|
||
|
<label for="dark_mode">Dark Mode</label>
|
||
|
|
||
|
|
||
|
<input type="checkbox" id="is_justified" value="1" checked />
|
||
|
<label for="is_justified">Justified</label>
|
||
|
|
||
|
|
||
|
<label>Animation:</label>
|
||
|
<select id="animation">
|
||
|
<option value="none">None</option>
|
||
|
<option value="fade">Fade</option>
|
||
|
<option value="slide-horizontal" selected>Slide Horizontal</option>
|
||
|
<option value="slide-vertical">Slide Vertical</option>
|
||
|
<option value="slide-swing">Slide Swing</option>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<label>Go To:</label>
|
||
|
<select id="got_to_step">
|
||
|
<option value="1">1</option>
|
||
|
<option value="2">2</option>
|
||
|
<option value="3">3</option>
|
||
|
<option value="4">4</option>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<label>External Buttons:</label>
|
||
|
<button class="btn btn-secondary" id="prev-btn" type="button">Go Previous</button>
|
||
|
<button class="btn btn-secondary" id="next-btn" type="button">Go Next</button>
|
||
|
<button class="btn btn-danger" id="reset-btn" type="button">Reset Wizard</button>
|
||
|
</p>
|
||
|
<br />
|
||
|
|
||
|
|
||
|
<!-- SmartWizard html -->
|
||
|
<div id="smartwizard">
|
||
|
|
||
|
<ul class="nav">
|
||
|
<li class="nav-item">
|
||
|
<a class="nav-link" href="#step-1">
|
||
|
<strong>Step 1</strong> <br>This is step description
|
||
|
</a>
|
||
|
</li>
|
||
|
<li class="nav-item">
|
||
|
<a class="nav-link" href="#step-2">
|
||
|
<strong>Step 2</strong> <br>This is step description
|
||
|
</a>
|
||
|
</li>
|
||
|
<li class="nav-item">
|
||
|
<a class="nav-link" href="#step-3">
|
||
|
<strong>Step 3</strong> <br>This is step description
|
||
|
</a>
|
||
|
</li>
|
||
|
<li class="nav-item">
|
||
|
<a class="nav-link " href="#step-4">
|
||
|
<strong>Step 4</strong> <br>This is step description
|
||
|
</a>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="tab-content">
|
||
|
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
|
||
|
<h3>Step 1 Content</h3>
|
||
|
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>
|
||
|
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
|
||
|
<h3>Step 2 Content</h3>
|
||
|
<div>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>
|
||
|
</div>
|
||
|
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
|
||
|
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>
|
||
|
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
|
||
|
<h3>Step 4 Content</h3>
|
||
|
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.
|
||
|
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>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<br />
|
||
|
|
||
|
<!-- Include jQuery -->
|
||
|
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
|
||
|
|
||
|
<!-- Include SmartWizard JavaScript source -->
|
||
|
<script type="text/javascript" src="./js/jquery.smartWizard.min.js"></script>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function(){
|
||
|
|
||
|
// Toolbar extra buttons
|
||
|
var btnFinish = $('<button></button>').text('Finish')
|
||
|
.addClass('btn btn-info')
|
||
|
.on('click', function(){ alert('Finish Clicked'); });
|
||
|
var btnCancel = $('<button></button>').text('Cancel')
|
||
|
.addClass('btn btn-danger')
|
||
|
.on('click', function(){ $('#smartwizard').smartWizard("reset"); });
|
||
|
|
||
|
// Step show event
|
||
|
$("#smartwizard").on("showStep", function(e, anchorObject, stepNumber, stepDirection, stepPosition) {
|
||
|
$("#prev-btn").removeClass('disabled');
|
||
|
$("#next-btn").removeClass('disabled');
|
||
|
if(stepPosition === 'first') {
|
||
|
$("#prev-btn").addClass('disabled');
|
||
|
} else if(stepPosition === 'last') {
|
||
|
$("#next-btn").addClass('disabled');
|
||
|
} else {
|
||
|
$("#prev-btn").removeClass('disabled');
|
||
|
$("#next-btn").removeClass('disabled');
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// Smart Wizard
|
||
|
$('#smartwizard').smartWizard({
|
||
|
selected: 0,
|
||
|
theme: 'arrows', // default, arrows, dots, progress
|
||
|
// darkMode: true,
|
||
|
transition: {
|
||
|
animation: 'slide-horizontal', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
|
||
|
},
|
||
|
toolbarSettings: {
|
||
|
toolbarPosition: 'both', // both bottom
|
||
|
toolbarExtraButtons: [btnFinish, btnCancel]
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// External Button Events
|
||
|
$("#reset-btn").on("click", function() {
|
||
|
// Reset wizard
|
||
|
$('#smartwizard').smartWizard("reset");
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
$("#prev-btn").on("click", function() {
|
||
|
// Navigate previous
|
||
|
$('#smartwizard').smartWizard("prev");
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
$("#next-btn").on("click", function() {
|
||
|
// Navigate next
|
||
|
$('#smartwizard').smartWizard("next");
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
|
||
|
// Demo Button Events
|
||
|
$("#got_to_step").on("change", function() {
|
||
|
// Go to step
|
||
|
var step_index = $(this).val() - 1;
|
||
|
$('#smartwizard').smartWizard("goToStep", step_index);
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
|
||
|
$("#dark_mode").on("click", function() {
|
||
|
// Change dark mode
|
||
|
var options = {
|
||
|
darkMode: $(this).prop("checked")
|
||
|
};
|
||
|
|
||
|
$('#smartwizard').smartWizard("setOptions", options);
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
$("#is_justified").on("click", function() {
|
||
|
// Change Justify
|
||
|
var options = {
|
||
|
justified: $(this).prop("checked")
|
||
|
};
|
||
|
|
||
|
$('#smartwizard').smartWizard("setOptions", options);
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
$("#animation").on("change", function() {
|
||
|
// Change theme
|
||
|
var options = {
|
||
|
transition: {
|
||
|
animation: $(this).val()
|
||
|
},
|
||
|
};
|
||
|
$('#smartwizard').smartWizard("setOptions", options);
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
$("#theme_selector").on("change", function() {
|
||
|
// Change theme
|
||
|
var options = {
|
||
|
theme: $(this).val()
|
||
|
};
|
||
|
$('#smartwizard').smartWizard("setOptions", options);
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|