So what I have is a big image that I'm trying to animate continuously while someone is on the page
What I do now is:
$('.photobanner').animate({
backgroundPosition:"(-10000px 0px)"
}, 80000, 'linear');
and this works .. but it seems it comes to an end and stops .. can I do the same animation infinitely ??
NOW IT WORKS ----
var counter=0;
function moveBG(y)
{
counter=counter-1000;
$('.photobanner').animate({ backgroundPosition:"("+counter+"px 0px)" }, 8000, 'linear',moveBG);
}
I defined a counter which will be incremented to infinity and used the this function.