inserting html with php on submit, but how to use jquery to fade out that html? -
i'm inserting h3 tag when form submitted. how fade h3 tag out in 5 seconds using jquery?
i tried didn't work. have use .live?
$(document).ready(function() { $('h3').delay(5000).fadeout(300); });
edit: i'm submitting form in case matters.
i think in situation, want in form submit:
//insert h3 var header = $('<h3>my header!</h3>'); //append wherever $('body').append(header); //set timeout, fade away! settimeout(function() { header.fadeout(300); }, 5000);
here's demo of that: http://jsfiddle.net/wsxfw/
Comments
Post a Comment