Hello I m using jquery validations , my form is validating and submitting successfully but the fields containing the previous data, i want to reset the fields after submitting the form.
the $('#frm').reset(); is not working.
submitHandler: function(form)
{
$.ajax({
url: "contact_submit.php",
type: "post",
data: $("#frm").serialize(),
success:function(response)
{
if(response)
{
$('#msg-valid').html('<img src="img/valid.png">Your form is submited, Thank You !');
$('#frm').reset();
}
else{
$('#msg-error').html('<img src="img/error.png">Your form is not submited');
}
}
});
}