2
$("#example-basic").steps({
5
transitionEffect: "slideLeft",
10
var form = $("#example-form");
12
errorPlacement: function errorPlacement(error, element) {
13
element.before(error);
21
form.children("div").steps({
24
transitionEffect: "slideLeft",
25
onStepChanging: function (event, currentIndex, newIndex) {
26
form.validate().settings.ignore = ":disabled,:hidden";
29
onFinishing: function (event, currentIndex) {
30
form.validate().settings.ignore = ":disabled";
33
onFinished: function (event, currentIndex) {
40
var advanced_form = $("#example-advanced-form").show();
46
transitionEffect: "slideLeft",
47
onStepChanging: function (event, currentIndex, newIndex) {
49
if (currentIndex > newIndex) {
53
if (newIndex === 3 && Number($("#age-2").val()) < 18) {
57
if (currentIndex < newIndex) {
59
advanced_form.find(".body:eq(" + newIndex + ") label.error").remove();
60
advanced_form.find(".body:eq(" + newIndex + ") .error").removeClass("error");
62
advanced_form.validate().settings.ignore = ":disabled,:hidden";
63
return advanced_form.valid();
65
onStepChanged: function (event, currentIndex, priorIndex) {
67
if (currentIndex === 2 && Number($("#age-2").val()) >= 18) {
68
advanced_form.steps("next");
71
if (currentIndex === 2 && priorIndex === 3) {
72
advanced_form.steps("previous");
75
onFinishing: function (event, currentIndex) {
76
advanced_form.validate().settings.ignore = ":disabled";
77
return advanced_form.valid();
79
onFinished: function (event, currentIndex) {
84
errorPlacement: function errorPlacement(error, element) {
85
element.before(error);
89
equalTo: "#password-2",
95
$("#example-manipulation").steps({
99
enablePagination: false,
104
$("#example-vertical").steps({
107
transitionEffect: "slideLeft",
108
stepsOrientation: "vertical",
112
$(".tab-wizard").steps({
115
transitionEffect: "fade",
116
titleTemplate: '<span class="step">#index#</span> #title#',
120
onFinished: function (event, currentIndex) {
123
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lorem erat eleifend ex semper, lobortis purus sed."
128
var form = $(".validation-wizard").show();
130
$(".validation-wizard").steps({
133
transitionEffect: "fade",
134
titleTemplate: '<span class="step">#index#</span> #title#',
138
onStepChanging: function (event, currentIndex, newIndex) {
140
currentIndex > newIndex ||
141
(!(3 === newIndex && Number($("#age-2").val()) < 18) &&
142
(currentIndex < newIndex &&
143
(form.find(".body:eq(" + newIndex + ") label.error").remove(),
144
form.find(".body:eq(" + newIndex + ") .error").removeClass("error")),
145
(form.validate().settings.ignore = ":disabled,:hidden"),
149
onFinishing: function (event, currentIndex) {
150
return (form.validate().settings.ignore = ":disabled"), form.valid();
152
onFinished: function (event, currentIndex) {
155
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lorem erat eleifend ex semper, lobortis purus sed."
159
$(".validation-wizard").validate({
160
ignore: "input[type=hidden]",
161
errorClass: "text-danger",
162
successClass: "text-success",
163
highlight: function (element, errorClass) {
164
$(element).removeClass(errorClass);
166
unhighlight: function (element, errorClass) {
167
$(element).removeClass(errorClass);
169
errorPlacement: function (error, element) {
170
error.insertAfter(element);