Animation with jquery - callback problem
Hello everyone!
I am preparing web-presentation and I would like to use jQuery animation to move some content.
This animation consists of sequence of actions. Here is the code of script:
- <!-- Script moving elements of animation -->
- <script type="text/javascript">
- var speed=2000, txt="";
- function animacja(){
- $('.firstArrow').animate({top:-70, left:650},speed, function(){
- $('#refreshImage').fadeOut(500, function(){
- $('#refreshImageGreen').animate({ transform: 'rotate(180deg)'}, 1000, function(){
- $('#refreshImage').fadeIn(500);
- $('#etlArrow').animate({left:1100}, function(){
- //restarting positions of arrows
- $('#erpArrow').css({left:430, top:-270});
- $('#scmArrow').css({top:-120, left:430});
- $('#crmArrow').css({top:30, left:430});
- $('#otherArrow').css({top:180, left:430});
- $('#etlArrow').css({left:680});
- });
- });
- });
- });
- }
- $(document).ready(function(){
- animacja();
- //introductionInterval=setInterval(animacja, 6500);
- });
And here is the link for you to take a look at it:
The problem is that green arrow is moving few times in a row. It should be moved once and stopped. Then its position should be reset to starting position.
Do you have any ideas for fixing that?
Best Regards,
Adrian