fix steps focusFirstInvalid with fadeSpeed
This commit is contained in:
parent
5d98a7aa86
commit
b35d28de81
4 changed files with 9 additions and 1354 deletions
|
@ -203,6 +203,8 @@
|
|||
|
||||
$('form.idealforms').idealforms({
|
||||
|
||||
silentLoad: false,
|
||||
|
||||
rules: {
|
||||
'username': 'required username ajax',
|
||||
'email': 'required email',
|
||||
|
@ -225,7 +227,10 @@
|
|||
|
||||
onSubmit: function(invalid, e) {
|
||||
e.preventDefault();
|
||||
$('#invalid').show().text(invalid ? (invalid +' invalid fields') : 'All good!');
|
||||
$('#invalid')
|
||||
.show()
|
||||
.toggleClass('valid', ! invalid)
|
||||
.text(invalid ? (invalid +' invalid fields') : 'All good!');
|
||||
},
|
||||
|
||||
steps: {
|
||||
|
|
|
@ -58,6 +58,8 @@ module.exports = {
|
|||
return $(this).find(firstInvalid).length;
|
||||
}).index();
|
||||
});
|
||||
|
||||
setTimeout(function(){ $(firstInvalid).focus() }, this.opts.steps.fadeSpeed);
|
||||
},
|
||||
|
||||
_buildSteps: function() {
|
||||
|
|
File diff suppressed because one or more lines are too long
2
js/out/jquery.idealforms.min.js
vendored
2
js/out/jquery.idealforms.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue