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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:28:05+00:00 2026-05-29T13:28:05+00:00

I have to perform two animations on an object simultaneously. For a number of

  • 0

I have to perform two animations on an object simultaneously.
For a number of reasons, I want to use jQuery for the vertical animation and CSS3 for the horizontal one.

On jQuery side, swing easing works great:

jquery swing

swing: function (a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}

I’m looking for a way to express this easing function in CSS3 transition.

If it is impossible, I’m looking for an easing function (e.g. a Bézier curve) that is most similar to swing
and can be used both in jQuery and CSS3. Please include link to any required plugins.

  • 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-29T13:28:06+00:00Added an answer on May 29, 2026 at 1:28 pm

    TL;DR

    I found that [.02, .01, .47, 1] Bézier curve provides a good enough approximation.

    CSS3

    -webkit-transition: all 1s cubic-bezier(.02, .01, .47, 1); 
    -moz-transition: all 1s cubic-bezier(.02, .01, .47, 1); 
    transition: all 1s cubic-bezier(.02, .01, .47, 1); 
    

    jQuery

    $(element).animate({ height: height }, 1000, $.easie(.02, .01, .47, 1));            
    

    with jquery.easie (you might as well use bez).


    The Quest

    I used these graphs from Sparky672’s answer to find out the exact function and its arguments:

    enter image description here

    It’s the same as y = –x • (x – 2) where x is between 0 and 1.
    So I created a graph with abettercalculator:

    enter image description here

    I cropped it and put it online.
    Then used position: absolute to overlay cubic-bezier.com, suggested by Jim Jeffers.

    enter image description here

    The resulting approximation that I used was [.02, .01, .47, 1].

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

Sidebar

Related Questions

I have two matrices I want to perform a loop on. My problem is
I have two animations that I'm trying to perform on a UILabel on the
You have two servers when you perform a SQL Server database mirroring You have
I have a web application that uses two databases. DB1 Users perform their CRUD
I'm having some problems trying to perform a query. I have two tables, one
I have to perform a large number of replacements in some documents, and the
I am needing to perform two sets of validation with jquery. First validation occurs
I want to perform a JOIN on two Datatables in a Dataset. For example,
I have a FrameLayout in which I have placed two identical TextViews. I want
I currently have two different event handlers in C#, which perform two different functions.

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.