我正在编码一步一步的形式。包括一个jquery脚本来划分我的表单。所以在第一种形式中,我必须只放一个按钮,这是下一个按钮,将客户端的下一个表格如何验证我的表单,如果点击下一个按钮
但我必须处理,如果我点击下一个按钮,我的第一种形式它会得到而不验证第一个表单中的部分。
下面的按钮代码
<input name="Next" type="submit" id='button1' value="Next" />
这里的jQuery脚本,我认为有,除了IM下一个标签在jQuery的并不好做。
$(".next").click(function(){
if(animating) return false;
animating = true;
current_fs = $(this).parent();
next_fs = $(this).parent().next();
//activate next step on progressbar using the index of next_fs
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
//show the next fieldset
next_fs.show();
//hide the current fieldset with style
current_fs.animate({opacity: 0}, {
step: function(now, mx) {
//as the opacity of current_fs reduces to 0 - stored in "now"
//1. scale current_fs down to 80%
scale = 1 - (1 - now) * 0.2;
//2. bring next_fs from the right(50%)
left = (now * 50)+"%";
//3. increase opacity of next_fs to 1 as it moves in
opacity = 1 - now;
current_fs.css({'transform': 'scale('+scale+')'});
next_fs.css({'left': left, 'opacity': opacity});
},
duration: 800,
complete: function(){
current_fs.hide();
animating = false;
},
//this comes from the custom easing plugin
easing: 'easeInOutBack'
});
的问题是如何去另一种形式,但与第一个验证。 由于事先
请停止posti重复的问题。 – Sparky 2014-09-13 19:45:05