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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:44:30+00:00 2026-06-16T08:44:30+00:00

How can I my CSS styling background and text to slide up into the

  • 0

How can I my CSS styling background and text to slide up into the jQuery action smoothly? Right now upon clicking again to close, the background color will disappear and then the text will slide up. I want the background to to stay and slide up with the text.

I am also trying to figure out how to get one action to close upon clicking on another. My code is here.

  • 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-06-16T08:44:31+00:00Added an answer on June 16, 2026 at 8:44 am

    It’s not totally obvious but, in this line of code:

      $(this).siblings().slideToggle('slow').parent().toggleClass('expanded');
    

    The slideToggle function is actually going to run in an asynchronous fashion. That is, it’s highly likely toggleClass will run before the animation finishes. If you read up on the jQuery docs for slideToggle you will see it accepts a callback function as an optional parameter. Any time you want to make sure a piece of code runs AFTER the animation is done then use the callback. For example:

    var _this = this; // because this will point to a different object inside the callback
    $(this).siblings().slideToggle('slow', function() {
       $(_this).parent().toggleClass('expanded');
    });
    

    Or something like that. It’s not immediately obvious what final outcome you are seeking. But hopefully this will help you on your way.

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

Sidebar

Related Questions

How can i override css property with javascript/jQuery, like cssHooks(jQuery), but prop was in
How can I change CSS display none or block property using jQuery?
I'm trying to click a link & put that text into a jquery dialog
For styling disabled elements I used: [disabled] { /* Text and background colour, medium
Can anyone please help me with this. I am new to css styling. I
Is there a way to import the styling of a single CSS selector into
I am currently styling an <input type='button'/> element with the following CSS: background: transparent
We can write CSS as the following types: Inline CSS Embedded CSS External CSS
I'm new to shadow in css can we set shadows for round image(i mean
Where are all of the places you can put CSS style information on 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.