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 8976761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:13:07+00:00 2026-06-15T19:13:07+00:00

I have a simple cloud image that I wish to go from the left

  • 0

I have a simple cloud image that I wish to go from the left to right side of the browser, where it should disappear outside the right side of the screen while fading out, and then fade back in and start the animation all over again, from the left. Here is the code I have so far:

var animate = function(targetElement, speed){

    $('#cloudsAnimated').css({left:'-200px'});
    $('#cloudsAnimated').animate(
        {
        'left': "100%",
        opacity:0
        },
        {
        duration: speed,
        easing:"linear",
        complete: function(){
            animate(this, speed);
            }
        }
    );

};
animate($('#cloudsAnimated'), 5000);

This function fades out the image as it gets to the right side of the screen, but it completely disappears and doesn’t appear again (I’ve set the ‘complete’ key of the function to restart again). If I keep the opacity unchanged then it does start again, so it has something to do with the opacity. Again, I’d like the image to fade back in and start moving from left to right all over again.

Please let me know if you know a solution! Thanks.

  • 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-15T19:13:08+00:00Added an answer on June 15, 2026 at 7:13 pm
    $("#cloudsAnimated").css({left: '-200px').fadeIn();
    

    You may also want to use the width of #cloudsAnimated instead of hard coding -200

    You could also use .animate again so that it fades in on the same queue:

    $("#cloudsAnimated").css({left: '-200px');
    $("#cloudsAnimated").animate({'left': 0, 'opacity': 1}, 500);
    

    The 500 is just a guess .. if you want the real animation time it would probably be speed divided by the ratio of 200 to the window width.

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

Sidebar

Related Questions

I have simple win service, that executes few tasks periodically. How should I pass
I have simple php validation form that is halfway working. If you leave the
I've uploaded a simple Ruby test application to Cloud Foundry that works on my
right now, we have a single server with a cronjob tab that sends out
Let do simple thing, we have a cloud, which client draws, and server which
I have a cloud of points that are supposed to represent a face. I
I have a simple CRM system that allows sales to put in customer info
I have deployed a very simple Grails test app on Cloud Foundry which uses
I have a question about deployment Java application in cloud. I've developed simple application
Platform: Google App Engine (Python) Database: Google Cloud SQL I basically have a simple

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.