I have a client who has requested a continuous sliding banner, basically it’s one image that moves from left to right over 5 seconds, I know how to do that, I just need to know how to set it up so it loops and it plays like a continuous animation
$(document).ready(function() {
function slide() {
$(".img1").stop(true).animate({'left' : '960px'}, 5000);
}
slide();
});
Thanks
EDIT
ok trying this, still not looping, have been trying setIntervals but not working, I know I’m missing something simple, but what
function slide(){
$('.homepageslider').animate({ 'left' : '0px' }),
{ duration: 5000,
complete: function() { $(".homepageslider").css('left','-2028px');
slide();
}
}
};
I prefer appending clone of image after the current image and removing previous image once its out of sight so it looks seamless but you can try above code also.