/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function loopAnimation() { $('.element').animate({ marginTop: '+=20', }, 500, function() { $('#window').animate({ marginTop: '-=20', }, 500, function() { loopAnimation() }); }); } loopAnimation()