I would like to flash a success message on my page.
I am using the jQuery fadeOut method to fade and then remove the element. I can increase the duratio
fadeOut
use setTimeout(function(){$elem.hide();}, 5000);
setTimeout(function(){$elem.hide();}, 5000);
Where $elem is the element you wish to hide, and 5000 is the delay in milliseconds. You can actually use any function within the call to setTimeout(), that code just defines a small anonymous function for simplicity.
$elem
5000
setTimeout()