Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8718121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:27:54+00:00 2026-06-13T06:27:54+00:00

So what I have is a big image that I’m trying to animate continuously

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:27:55+00:00Added an answer on June 13, 2026 at 6:27 am

    You could always do something like this:

    function moveBG()
    {
        $('.photobanner').css({ backgroundPosition:"(0px 0px)"});
        $('.photobanner').animate({ backgroundPosition:"(-1000px 0px)" }, 8000, 'linear',moveBG);
    }
    

    So that the callback of the function redoes the function. It would have to be a seemless image though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image that is too big and I want to put it
I have a piece of code that load a very big image in memory.
I have a big <div /> container that has an image as a background.
I have a big div with a big background-image. Now I want to create
I have a big image that has to go in the background. Say the
I have a flashbuilder project with a big image. The problem is that the
I have a major headache trying to get an image that is contained within
I have a big image that will be used eventually as an icon for
I'm trying to create a simple image gallery where I have one big photo
I have a div element with a background image that I am vertically trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.