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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:34:55+00:00 2026-05-23T02:34:55+00:00

I had some help with understanding how I can animate some text using jQuery.

  • 0

I had some help with understanding how I can animate some text using jQuery. One of the users suggested I use the .fadeIn() function. When I look at this it looks like it meets my needs but I have a question:

Here’s what I have now:

if (correct == "true") {
   $('#ft2').html('Correct');
   $('#ft2').css('color', 'Green')
   $('#ft2').css('border-color', 'Green')
} else {
   $('#ft2').html('Incorrect');
  $('#ft2').css('color', 'Red')
  $('#ft2').css('border-color', 'Red')
}

Same as from my last question. Now I would like to first set the opacity of the color and border to invisible and then fade in the css color and border-color properties to the new color both at the SAME time. Is it possible to make .fadeIn() fade in more than one thing at once? Has anyone tried doing this?

Thanks again for all the help already provided to me

  • 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-23T02:34:55+00:00Added an answer on May 23, 2026 at 2:34 am

    fadeIn will fade in the entire element (all its parts, including the border, background color, foreground color, etc.), not just individual bits of it. fadeIn and fadeOut work by modifying the opacity of the element as a whole. So this concept of fading in individual aspects of an element doesn’t apply to fadeIn and fadeOut.

    If you want to go the fadeout/fadein way, and you really want it to take a full second as you said in your previous question (which seems like a really long time) here’s how:

    var color, text;
    
    if (correct == "true") { // Do you really mean to compare to a string here?
        text = 'Correct';
        color = 'green';
    }
    else {
        text = 'Incorrect';
        color = 'red';
    }
    
    $('#ft2').fadeOut(500, function() {
        $(this).text(text).css({
            'color': color,
            'border-color': color
        }).fadeIn(500);
    });
    

    Gratuitous live example

    That fades out the element with its current content (taking half a second; 500ms), and when the fadeout is complete changes the content and color, then fades it back in across another half second (500ms). You could weight those differently, fade out in 250ms and then fade in over 750ms, although I’d suggest using a shorter overall time.

    But I think I’d probably go with one of the color plugins one of the people answering your previous question pointed you to.

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

Sidebar

Related Questions

Ive just had some fantastic help from Sandeepan, thank you! Please can anyone see
Need some help with this problem in implementing with XSLT, I had already implemented
I had some questions regarding the structure and behavior of a model, using UML,
I had some decryption code (using wincrypt.h ) that lived within my FileReader.cpp class.
Ok, so a little while back I had some help writing some PHP voting
I have had quite some difficulty trying to make a User Defined Function (UDF)
I had some time and decided to implement a one time pad just for
I'm looking for some help converting this from prototype to jQuery. I'm doing some
I had some help today with a need and this is what I have
I had some help in the past with getting the coordinates of a network

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.