Posted By

ponjoh on 10/08/10


Tagged

jquery loop animate


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Tyster
alifaziz


Looped animation


 / Published in: jQuery
 

  1. function loopAnimation() {
  2. $('.element').animate({
  3. marginTop: '+=20',
  4. }, 500, function() {
  5. $('#window').animate({
  6. marginTop: '-=20',
  7. }, 500, function() {
  8. loopAnimation()
  9. });
  10. });
  11. }
  12.  
  13. loopAnimation()

Report this snippet  

You need to login to post a comment.