Goal
Replace one div with another after 5 seconds delay using jQuery.
Description
I would like to show an image in a div for 5 seconds and after that it should be replaced with text in another div.
HTML Code
<div id="outer">Image here</div>
<div id="text">Text here</div>
jQuery Code
<script type="text/javascript">
$(document).ready(function()
{
setTimeout(function()
{
$("div#outer").fadeOut("slow", function ()
{
$("div#outer").remove();
});
}, 5000);
});
</script>
Thanks in advance.
Here is the Demo Link : http://jsfiddle.net/pHJgP/8/
HTML Code:
Jquery Code:
hope this is helpful for you.