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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:44:05+00:00 2026-05-13T18:44:05+00:00

Sorry if this is an easy one, I’m new to jQuery. I am using

  • 0

Sorry if this is an easy one, I’m new to jQuery. I am using the Flip! plugin to rotate a div in place. I would also like to move the div while it is rotating. Currently I am doing this:

        $("#flipDiv").flip({
            direction:'lr',
            content:newContent
        });
        $("#flipDiv").animate({
            'marginLeft' : "+=150px"
        });

It does flip the div, but the animation does not run until the flipping is done, and even then it goes all at once. Since I am not very familiar with javascript, I do not know if this is a limitation of the language, or of this particular plugin, or if I am just doing it wrong. Does anyone know of a better way something like this can be done?

  • 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-13T18:44:05+00:00Added an answer on May 13, 2026 at 6:44 pm

    I’m assuming that flip must just be using animate under the covers, which by default allows you to queue up multiple animations which then play out in order. To avoid this you can tell an given animation to not queue itself and execute immediately.

    So try this:

    $("#flipDiv").flip({
     direction:'lr',
     content:newContent
    });
    $("#flipDiv").animate({
     'marginLeft' : "+=150px"
    }, {queue: false});
    

    For more information have a look at the API documentation on animate, as well as queue and dequeue.


    Edit: Ok, looking at the source of the flip plugin I now believe the problem is that when you run flip it actually hides the element (#flipDiv in your case), creates a placeholder clone that it does its flip animation on & then re-shows the original div in its final state. This means that even if you make the animation happen at the same time, it will be animating the hidden div, so it will suddenly reappear either half way through the animation or after it has finished.

    You could try instead to animate the clone, which you can access from the onBefore callback like so:

    $("#flipDiv").flip({
      direction:'lr',
      content:newContent,
      onBefore: function(clone) {
        clone.animate({ 'marginLeft' : "+=150px" }, {queue: false});
      })
    });
    

    Of course that won’t actually move the original div, so when the flip finishes your div will still be in the old location, so you’ll need to shift that too. If you expect the animate to take the same (or less) time as the flip then you could just set the original’s marginLeft directly, otherwise you could animate it too so it stays roughly in sync.

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

Sidebar

Related Questions

Sorry if this is an easy one. Basically, here is my code: MainViewController.h :
Sorry if this is too easy of a question, but I'm fairly new to
Sorry, this may be an easy one, but it has me stumped. I'm trying
First I'm so newb to iPhone dev and I'm sorry if this is easy.
Sorry if this question is very easy, but I can't find the answer anywhere.
So, here's the problem (it's probably an easy one :P) This is my table
Sorry if this question is too simple or easy. I just started studying Delegates
I've been googling for a while now... Ok, I'm sorry, this one is pathetically
Sorry friends if this question is very easy but i am confuse i unable
Sorry this is not a very well defined question, I am thinking about an

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.