I want to achieve a sequential flying-in effect when my page loads, with each div sliding in one by one. Currently, all the divs fly in simultaneously, but I'd like them to come in sequentially.
Here is my code snippet:
<script>
function animateEnter( object ){
object = $("#"+object);
object.css("left","1000px");
object.animate({
left: "0px"
});
}
</script>
<div id="1"></div>
<script>
animateEnter("1");
</script>
<div id="2"></div>
<script>
animateEnter("2");
</script>
<div id="3"></div>
<script>
animateEnter("3");
</script>