pridal som tu funckiu na zmenu strany pre succes no nejde proste ju nespusti
Kód:
$(document).ready(function() {
// bind form using ajaxForm
$('#myForm').ajaxForm( { beforeSubmit: validate } );
});
function validate(formData, jqForm, options) {
var form = jqForm[0];
if (!form.username.value || !form.password.value) {
alert('Please enter a value for both Username and Password');
return false;
}
function selectStep(n) {
if(n == 1) {
$(".progress-selected").animate({marginLeft: "0px"}, 300);
}else if(n == 2){
$(".progress-selected").animate({marginLeft: "70px"}, 300);
}else if(n == 3){
$(".progress-selected").animate({marginLeft: "140px"}, 300);
}else if(n == 4){
$(".progress-selected").animate({marginLeft: "210px"}, 300);
}else if(n == 5){
$(".progress-selected").animate({marginLeft: "280px"}, 300);
}else if(n == 6){
$(".progress-selected").animate({marginLeft: "350px"}, 300);
}else if(n == 7){
$(".progress-selected").animate({marginLeft: "420px"}, 300);
}
$(".content-switcher").hide();
$("#content"+n).show().addClass("animated flipInY");
$(".next").hide();
$("#a"+n).show();
}
}
Uncaught ReferenceError: selectStep is not defined