kenny kenny - 1 year ago 122
jQuery Question

Make jQuery animate loop

I know there are other and more preferred methods, but I'm trying to give a div img a bounce effect using jQuery.

I'm trying to loop


Any help would be awesome. Thanks!

Answer Source

One very simple solution:

function bounceUp(){
    $('#downarrow').animate({bottom:'4px'}, 1000, bounceDown);
function bounceDown(){
    $('#downarrow').animate({bottom:'0px'}, 1000, bounceUp);


An example:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download