Hi, need a little help.
I'm rotating some images and need it to loop.
So far I have this
var rotate = $(".rotate")
.animate({opacity: 1.0}, 3000)
.animate({marginTop: "-32px"}, "slow")
.animate({opacity: 1.0}, 3000)
.animate({marginTop: "-64px"}, "slow")
.animate({opacity: 1.0}, 3000)
.animate({marginTop: "0px"}, 0);
which works, but only one time, and I need it to loop.
I was think using an if statement to check if the marginTop was set to 0
and if it was to initiate the rotate var but I just don't know how to do
this.
this is the html I'm using
<div class="rotatebanners">
<div class="rotate">
<a href="#"><img src="something.gif" width="260"
height="32" alt="" /></a>
<a href="#"><img src="something.gif" width="260"
height="32" alt="" /></a>
<a href="#"><img src="something.gif" width="260"
height="32" alt="" /></a>
</div>
</div>
Does anyone know a way to check the marginTop or if you can't, explain
another way of doing this.
Thanks,
Liam