Javascript lose focus on first invalid field on 'unhighlight' event (jQuery Validation) when error messages (labels) 'display:block'.
I use pure code from latest jQuery Validation: jquerycom/Plugins/Validation
body {padding:20px;}
/*label.error {display:block;}*/
label.error {color:red;}
p {padding-bottom:15px;}
Code: http://jsfiddle.net/352TH/3/
Now just uncommented /*label.error { display:block; }*/
/*label.error { display:block; }*/
line in css code
body {padding:20px;}
label.error {display:block;}
label.error {color:red;}
p {padding-bottom:15px;}
Code: http://jsfiddle.net/352TH/4/
:(
Try this
Your code
$(function(){
$("#commentForm").validate({
errorLabelContainer: '.validationSummary'
});
});
change for
$("#commentForm").validate(function(){
errorLabelContainer: '.validationSummary'
});
And see this Example
Greetings.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.