Monday, 2 September 2013

ajaxContact form responseText smooth fade in

ajaxContact form responseText smooth fade in

Iam setting up this contact form and I need it to behave the same way as
other elements so my question is, how can I ad a smooth fade-in of the
responseText in this script?
$(document).ready(function() {
var options = {
target: '#contact-response',
beforeSubmit: showRequest,
success: showResponse
};
$('#contactForm').ajaxForm(options);
});
function showRequest(formData, jqForm, options) {
var queryString = $.param(formData);
return true;
}
function showResponse (responseText, statusText) {
}
$.fn.clearForm = function() {
return this.each(function() {
var type = this.type, tag = this.tagName.toLowerCase();
if (tag == 'form')
return $(':input',this).clearForm();
if (type == 'text' || type == 'password' || tag == 'textarea')
this.value = '';
else if (type == 'checkbox' || type == 'radio')
this.checked = false;
else if (tag == 'select')
this.selectedIndex = -1;
});
};
Thank you

No comments:

Post a Comment