-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
  • 199
  • 1
  • 2
  • 10

2 Answers2

2

Use .delay():

$("#CoverPop-cover").delay(5000).fadeOut();
friedi
  • 4,310
  • 1
  • 12
  • 19
1

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
  • 19,005
  • 3
  • 31
  • 64