I’m using bitrepository.com great AJAX Form which utilizes jQuery and PHP: http://www.bitrepository.com/a-simple-ajax-contact-form-with-php-validation.html
I’d like the error and validation DIV which appear after click to fade in.
Added the following jQuery code but to no avail (also tried with the click/change functions):
$(document).ready(function(){
if ($('.notification_error').length > 0) {
$('.notification_error').fadeTo("slow", 1.0);
}
});
Any help would be great…
Given that your code look exactly like the one you have referenced, you could change your ajax-complete callback to this:
This would fade in both error- and success-messages.
Update:
To only fade the element in the first time, you could replace the last line with something like this:
What we do is that we check if there is a en element with either class
notification_errorornotification_ok. If not (the first time) we fade it in, otherwise we just update the content.