I'm trying to figure out how to make 4 images fade out when the page loads.
Below is my (amateur) code:
Here is the HTML:
<div id="outercorners">
<img id="corner1" src="images/corner1.gif" width="6" height="6" alt=""/>
<img id="corner2" src="images/corner2.gif" width="6" height="6" alt=""/>
<img id="corner3" src="images/corner3.gif" width="6" height="6" alt=""/>
<img id="corner4" src="images/corner4.gif" width="6" height="6" alt=""/>
</div>
Here is the jQuery:
$(document).ready(function() {
$("#corner1").fadeIn("2000", function(){
$("#corner3").fadeIn("4000", function(){
$("#corner2").fadeIn("6000", function(){
$("#corner4").fadeIn("8000", function(){
});
});
});
});
Here is the css:
#outercorners {
position: fixed;
top:186px;
left:186px;
width:558px;
height:372px;
}
#corner1 {
position: fixed;
top:186px;
left:186px;
display: none;
}
#corner2 {
position: fixed;
top:186px;
left:744px;
display: none;
}
#corner3 {
position: fixed;
top:558px;
left:744px;
display: none;
}
#corner4 {
position: fixed;
top:558px;
left:186px;
display: none;
}
They seem to just wink at me, and not disappear in the order that I attributed to them. Should I use the queue () function? And if so, how would I implement it in this case?
Thanks for any help.
source
share