I am designing a contact form which has a 'Thank you' message pop up on send, I need my thank you message to be positioned relative, other wise if the user happens to scroll while the animation is running the message remains stuck in place and ruins the animation. However positing the div relative keeps it in the position before it loads, what I need is a way to have the div display:none or opacity:0 BEFORE the send button is pressed, is that possible?
Here is an http://jsfiddle.net/gcQ8f/ to explain what I'm trying to achieve a little better
And below is the Javascript I'm using
$(document).ready(function(){
$(".send-button").click(function(){
$("#contact-form") .delay(1000) .animate({ height:'toggle', opacity:'toggle' }, (400));
$("#contact-form") .delay(3000) .animate({ height:'toggle', opacity:'toggle' }, (400));
$(".contact").reset();
});
});
Any help would be really appreciated :)
Thanks guys!