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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:35:24+00:00 2026-05-24T21:35:24+00:00

I have a somewhat difficult animation to do in JQuery, and I haven’t found

  • 0

I have a somewhat difficult animation to do in JQuery, and I haven’t found a good way to handle it. I have a mobile site with a scene on the screen which displays a series of choices. When a choice is made, the choices slide off screen, and simultaneously a new scene of a city is brought in (it’s supposed to simulate driving) – and this scene, instead of stopping in the center of the screen, it passes all the way through the opposite end of the screen. The problem is, when it gets to the center, I want to trigger a new div to come in just behind it, matching the speed, etc, so everything appears in synch.

If I set the animation for the city scene to be in two parts, once to the center where it could trigger the new choice scene coming in, and once to go off screen, there is a noticeable jerk. And I haven’t found a way to trigger a delay, because at the end of the delay I need to make a call to a custom function, not a jquery function. So this is my code:

Driving Scene (called when choices begin animating out):

$('#interlude').animate({marginLeft: -viewportW + "px"},3000,'linear',function(){
    $('#interlude').remove();
    displayScene(sceneID); //need to figure out how to call this at the halfway point
});
  • 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-05-24T21:35:24+00:00Added an answer on May 24, 2026 at 9:35 pm

    Use setTimeout() right before your animation to trigger the second animation halfway through the first animation.

    var animateTime = 3000;
    setTimeout("displayScene(" + sceneId + ")", animateTime / 2);
    $('#interlude').animate({marginLeft: -viewportW + "px"},animateTime,'linear',function(){
        $('#interlude').remove();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a somewhat messily-formatted Objective-C code base. Is there a way to have
I have somewhat interesting development situation. The client and deployment server are inside a
Does VS2008 have somewhat C++0x standard support? DUPLICATE Visual Studio support for new C
I have a somewhat complicated branching structure at work (at least for me). It
I have several somewhat separate programs, that conceptually can fit into a single project.
I have a somewhat weird requirement to be able to listen to a number
I have a somewhat simple Client/Server solution running over C# remoting (System.Runtime.Remoting). The MarshalByRef
I have a somewhat-long-running stored procedure being called from a PB application. I want
I am learning about SOAP implementation and have become somewhat confused regarding the appropriate
OK, I have a somewhat complicated system in C++. In a nutshell, I need

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.