new to coding and jquery code not working please help not sure were problem is?????? please if anyone can help the code emails but doesn't show on screen that it went
if (jQuery('.comments-form,.contact-form').length > 0) {
Modernizr.load([{
load: ['js/jquery.form.js', 'js/jquery.validate.js'],
complete: function () {
jQuery('.comments-form,.contact-form').validate({
// Add requirements to each of the fields
rules: {
name: {
required: true,
minlength: 10
},
email: {
required: true,
email: true
},
message: {
required: true,
minlength: 20
}
},
// Specify what error messages to display
// when the user does something horrid
messages: {
name: {
required: kopa_variable.i18n.validate.name.REQUIRED,
minlength: jQuery.format(kopa_variable.i18n.validate.name.MINLENGTH)
},
email: {
required: kopa_variable.i18n.validate.email.REQUIRED,
email: kopa_variable.i18n.validate.email.EMAIL
},
message: {
required: kopa_variable.i18n.validate.message.REQUIRED,
minlength: jQuery.format(kopa_variable.i18n.validate.message.MINLENGTH)
}
},
// Use Ajax to send everything to processForm.php
submitHandler: function (form) {
jQuery(".comments-form .input-submit,.contact-form .input-submit").attr("value", kopa_variable.i18n.validate.form.SENDING);
jQuery(form).ajaxSubmit({
success: function (responseText, statusText, xhr, $form) {
jQuery("#response").html(responseText).hide().slideDown("fast");
jQuery(".comments-form .input-submit,.contact-form .input-submit").attr("value", kopa_variable.i18n.validate.form.SUBMIT);
}
});
return false;
}
});
}
}]);
}