Here is one of the codes:
$("#submit").click(function(){
if (message == '') {
$('#incorrmess').html('<img src = "wrong.png"/> Please type in your message').slideDown("slow");
} else {
//Ajax statement
}
});
And on the body of the page, I have the div. The effects are not working.
I also tried this:
$('#incorrmess').slideDown("slow").html('<img src = "wrong.png"/> Please type in your message');
What do I do to make the effects work?
Thanks.
You should first hide, and then slideDown. slideDown on a visible element won’t do anything.
$('#incorrmess').hide().html('<img src = "wrong.png"/> Please type in your message').slideDown("slow");