I am trying to tween an image and then have text come flying in afterwards. I have the image flying in already, but I can't seem to figure out how to make the text come in after the image is in...Also, I want to put a background to this entire div, but for some reason everything I've tried doesn't show up, nor does anything loop. Help? -- The image is something i've already made myself on Illustrator so I cannot upload the image but if someone can please help me fix this up, I'd really appreciate it!
Here's my HTML:
<script src="js/TweenMax.min.js"></script>
<div class="container">
<div class="row">
<div class="twelvecol last">
<div id="box">
<img src="images/cartoon-illustration.png" alt="cartoon" width="150" height="277">
</div>
</div>
</div>
</div>
Here's my Javascript:
function init() {
var b = document.getElementById("box");
b.style.left = -500 + "px";
TweenMax.to(b, 1.5, {css:{left:200}, ease:Expo.easeOut})
}
window.onload = init;
Here's my CSS:
#box {
width: 400px;
height: 400px;
position: absolute;
padding: 25px;
}