-1

I'm looking for a piece of code that will fade out a couple of div elements after a certain amount of time. Here's an example of what I'm working with at the moment:

<div id="CoverPop-cover" class="splash">
<div id="CoverPop-content" class="splash-center">
<img src="../Logo_Script.gif">
</div>
</div>

I'm looking for all of the information contained within this code to fade out after 5 seconds.

Sam Pittman
  • 189
  • 1
  • 3
  • 10

2 Answers2

3

Use .delay():

$("#CoverPop-cover").delay(5000).fadeOut();
friedi
  • 4,350
  • 1
  • 13
  • 19
2

try this , fade out all div after x second, here i suppose x equals to one second so . 1 second = 1000 ms you can change the second parameter to setTimout function in order to change "X" second

 setTimeout(function(){
$("div").fadeOut(300);}
,1000);
A.B
  • 20,110
  • 3
  • 37
  • 71