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

  • Home
  • SEARCH
  • 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 8628503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:33:41+00:00 2026-06-12T08:33:41+00:00

Yesterday I had troubles making something to rise up and down on click of

  • 0

Yesterday I had troubles making something to rise up and down on click of each button.

Thanks to user from stackoverflow “j08691” this problem has been resolved. However, I cannot manage to figureout how do I make content to fadeIn & out depending on each.

JS Fiddle

The user that helped me havent seen this one in my question. Perhaps somebody else can help me.

CSS and HTML sample elements has been added in fiddle. I just don’t know how to make it work.

For example as in fiddle we have button A, B, C and D.

If “A” is clicked it rises up and <div id="letterA">Letter A opened-content.</div> shall appear. If button A is clicked again it should disappear again. (fadeIn & fadeOut).

If Button “A” is active and any other button B, C or D is clicked, again button A will fadeOut the content and other clicked button will appear.

Its really simple to explain, but hard to make it work.

Thanks in advance.

  • 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-12T08:33:42+00:00Added an answer on June 12, 2026 at 8:33 am

    Here is a solution: http://jsfiddle.net/KQ3sq/1/

    I had to change the markup a bit though. The idea is to link each li with its target div. To do that I am using the HTML5 data attributes. You could also consider adding a link with an anchor to the corresponding div (fallback when no JS).

    Then the JS doing the magic is:

    var target = $(this).data('target');    
    $("#content").children(target).fadeIn().siblings().fadeOut();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following the question I had asked yesterday which is here passing contents from multiple
I had it working yesterday and then I did something and now I have
This is a continuation from a question that I had yesterday. I am trying
Yesterday i had a question in an interview which i thought i could find
Yesterday I had seen question concerning how to get file space information. I tried
Up until yesterday I had a perfectly working app on my iPhone. I made
Seems like just yesterday I had this same problem with Play! v1. After trying
In an programming interview I had yesterday, one of the programs I had to
This question has two parts. Part 1. Yesterday I had some code which would
We had a terrible problem/experience yesterday when trying to swap our staging <--> production

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.