Okay, I'm trying to be clear on this one...
I have some insliding boxes, all with the same class .box
When the page loads I want these slide in from the left. This works perfect according to this code:
$(document).ready(function(){
$(".box").animate({left: "-=920px", opacity: "1"}, 1250)
return false;
});
Now all the boxes are flying in at the same time. What I want is that the top box goes first, and the second box slides in a second later, en the third a second later than the second box, making a sort of chain reaction.
How can I achieve this, and still keep one class(to keep things dynamic)?
I'm also looking to create a blur to no-blur effect, if anyone has some ideas on that as well would be awesome, but it's not the priority
Edit: Complete code for testing:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".box").animate({left: "-=920px", opacity: "1"}, 1250)
return false;
});
</script>
<style type="text/css">
.box {
background: #6699FF;
height: 100px;
width: 100px;
position: relative;
margin-left: 920px;
opacity: 0.0;
}
#main_box{
overflow: hidden;
padding: 5px;
border: 3px solid;
}
</style>
<div id="main_box">
<div class="box">
</div>
<div class="box">
</div>
<div class="box">
</div>
</div>