Skip to content Skip to sidebar Skip to footer

Create An Animation Sequence Loop Jquery

I'm trying to create a continuous looping animation whereby one div img fades in and then the next fading out the last one this is what I have so far. JavaScript: function fadeLoop

Solution 1:

This may help you

$(function(){
    (function(){
        var circles=$('.circle'), i=0;
        function shuffle()
        {
            $(circles[i]).fadeIn(2000, function(){
                i=(i < circles.length-1) ? (i+1) : 0;
                setTimeout(function(){
                    $('.circle').fadeOut(2000);
                    shuffle();
                }, 2000);
            });
        }
        shuffle();
    })();
});​

DEMO.


Post a Comment for "Create An Animation Sequence Loop Jquery"