jquery ui animation time delay

I got a litte function that should create an endless bouncing effect on an icon.

function animMap1(){
    $("img.map_icon").animate({ top:"165px" },   300,"easeInOutQuad",function(){animMap2();});
    }
function animMap2(){
    $("img.map_icon").animate({ top:"185px" },300,"easeInOutQuad",function(){animMap1();});
    }

It works but each time it’s fired a little delay is added. Where is my mistake? What I want to achieve is something like this:

http://www.porte-sainte-claire.com/#page_venir-a-la-porte-sainte-claire

Any ideas? Thanks in advance!!


Source: jquery

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.