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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:07:20+00:00 2026-05-26T18:07:20+00:00

Is there a way to animate in Jquery without specifying every property? Lets, say:

  • 0

Is there a way to animate in Jquery without specifying every property?

Lets, say:

.classA{
   color:red;
}
.classB{
   color:blue;
}

function animate(selector,classA,classB,time){
    styles1 = $(classA).invented_get_styles();
    styles2 = $(classB).invented_get_styles();
    $(selector).animate(styles1,styles2,time);
}

Almost alll this syntax is invented but i think that what i am asking can be understood,

Is posible to animate from classes retrieving the styles (automated) and apply them instead of knowing (manual) the values? or if not, what’s the best way..

  • 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-26T18:07:21+00:00Added an answer on May 26, 2026 at 6:07 pm

    You can do it with jQueryUI/switchClass, you only need a custom build of jQueryUI with Effects Core enabled – nothing else, which is about 11k minified

    Example

    $( ".element_to_be_animated" ).switchClass( "oldClass", "newClass", 1000 );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way in jQuery to animate the css3 border-radius property available in
Is there any way i can animate a div using percentages with jquery? I've
Is there a way to stop a property from animating with jquery. I tried
Is there a way to animate enabling or disabling a button? I've tried the
IS there an easier way to animate the table view. All the rows in
he guys... i use this litte code-snippet for jquery: function updown() { $('#red').animate({top:'+=100'}, 5000,
I looking for way to animate text with jQuery. I want to display 'logging
is there a way to add a css3 animation upon a jQuery event for
With jQuery .animate() , I use to write like .animate({ 'font-size': 24px, 'color': '#555'
Is there a way to have an animated loading screen for my iPhone application

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.