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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:37:28+00:00 2026-06-19T01:37:28+00:00

It’s a while i’m trying to find something what i need and checked lots

  • 0

It’s a while i’m trying to find something what i need and checked lots of links @stackoverflow, @google & etc. but each time some thing isn’t working 100%

So problem is about making show/hide DIV’s where only one will be opened at once + could be closed on pressing same link, active DIV link should change it’s style.

One of most knows is: http://dimdajdeneg.com/temp/menu.html
but it’s not changing “show DIV” link style & you can’t close all DIV’s, like if first is open, clicking it again won’t close opened one.

This one is also interesting: http://dimdajdeneg.com/temp/menu2.html
it even closes it self, but “show DIV” link style isn’t changeable

I know that’s simple, but probably it’s just coz of monday 🙂
Anyone can help me?

Thank you 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-19T01:37:29+00:00Added an answer on June 19, 2026 at 1:37 am

    Here is what i came up with, it fades out everything except the clicked one (inside .not()), which gets toggled instead.

    HTML:

    <a href="" data-id="d1">Link 1</a>
    <a href="" data-id="d2">Link 1</a>
    <a href="" data-id="d3">Link 1</a>
    <div id="d1">Div 1</div>
    <div id="d2">Div 2</div>
    <div id="d3">Div 3</div>
    

    CSS:

    a {
        background:blue;
        color:red;
    }
    .active {
        background:green;
        color:white;
    }
    div{
        display:none;
    }
    

    jQuery:

    $('a').click(function(ev){
        ev.preventDefault();
        var id = $(this).data('id');
        $('a').not($(this).toggleClass('active')).removeClass('active');
    
        // parallel fading:      
        $('div').not($('#'+id).fadeToggle(500)).fadeOut(500);
        // OR
        // sequential fading:
        $.when($('div').not($('#'+id)).fadeOut(500)).done(function(){
            $('#'+id).fadeToggle(500)
        });
    });
    

    jsFiddle:

    http://jsfiddle.net/fKGc5/

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

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
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.