reset form()
reset form()
hi ! i have captcha form in my form . when send data with submit change captcha auto and reset form . ( with out jquery ) now : with jquery send data worked but not reset form after send data . how to reset form with jquery or reset any field ( captcha field ) after submit ?
-
$(document).ready(function() {
$().ajaxStart(function() {
$('#loading').show();
$('#result').hide();
}).ajaxStop(function() {
$('#loading').hide();
$('#result').fadeIn('slow');
});
$('#myForm').submit(function() {
$.ajax({
type: 'POST',
url: $(this).attr('action'),
data: $(this).serialize(),
success: function(data) {
$('#result').html(data);
}
})
return false;
});
})