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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:22:42+00:00 2026-05-27T09:22:42+00:00

i’m trying to make smooth animation during change class with Jquery. But it works

  • 0

i’m trying to make smooth animation during change class with Jquery.

But it works only with text-color, not background.

You can check this for detail 🙁 :

http://jsbin.com/upufut

  • 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-27T09:22:43+00:00Added an answer on May 27, 2026 at 9:22 am

    This is simply a matter of version of the libraries.

    Your jsbin shows jQuery 1.3.2 and jQuery UI 1.7.2.

    In this jsfiddle (with jq 1.3.2 and jqui 1.7.2), it does not work.

    In this other one, latest versions of both libraries, it works.

    jQuery 1.3.2 is more thand legacy, you should not use it anymore, except if you don’t have the choice, but then you should expect some (over-the-top) things not to work I’m afraid.


    Animating gradients

    Looking at the documentation from jQuery UI, they seem not to support gradient on the overloaded .animate() to animate colors (doc). I guess it just works with solid colors.

    The jQuery UI effects core extends the animate function to be able to
    animate colors as well. It’s heavily used by the class transition
    feature and it’s able to color animate the following properties:

    • backgroundColor
    • borderBottomColor
    • borderLeftColor
    • borderRightColor
    • borderTopColor
    • color
    • outlineColor

    with one of the following combinations:

    • hex (#FF0000)
    • rgb (rgb(255,255,255))
    • names (“black”)

    CSS transitions on the other hand does not handle gradients neither in any browser. There any several workarounds though:

    • css transition with linear gradient (second answer – not the accepted one – proposes a workaround with an extra element and transitionning the opacity, works in Chrome & FF)
    • Webkit support for gradient transitions

    A word on YouTube’s buttons you mention.

    For me, the gradients are not animated as they use CSS transitions. Here is how I tested that:

    1. Go to a video page on youtube.
    2. “Inspect element” on a button (in chrome) to open the console. Select the <button> element.
    3. Looking at the CSS class .yt-uix-button, change the [-*-]transition: all 0.218s; to “1s”
    4. Change one of the colors of the gradient to Green for instance.
    5. Hover the button, all properties are animated, but not the gradient.

    My opinion is that the animation of the border (etc) gives the impression the gradient is animated but it’s not.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into

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.