Skip to content

Commit 61943a7

Browse files
author
Rafael J. Staib
committed
Add improvement for advanced form demo
1 parent b195d39 commit 61943a7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

advanced-form.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ <h2>A powerful jQuery wizard plugin that supports accessibility and HTML5.</h2>
6666
return false;
6767
}
6868

69+
// Needed in some cases if the user went back (clean up)
70+
if (currentIndex < newIndex)
71+
{
72+
// To remove error styles
73+
$("#form .body:eq(" + newIndex + ") label.error").remove();
74+
$("#form .body:eq(" + newIndex + ") .error").removeClass("error");
75+
}
76+
6977
$("#form").validate().settings.ignore = ":disabled,:hidden";
7078
return $("#form").valid();
7179
},

0 commit comments

Comments
 (0)