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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:03:36+00:00 2026-05-23T15:03:36+00:00

I have a question, (Below) I am trying to make the links to the

  • 0

I have a question, (Below) I am trying to make the links to the two tabs that rollup accordion style to shade the one that isn’t selected. I have accomplished this but now I need to darken to two links once they are both closed.

Could you point me in the right direction?

WDH

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<!-- <script type="text/javascript" src="../../../jQ_161/jquery-1.6.1.js"></script> -->

<script type="text/javascript">

$(document).ready(function(){
  $(".divOneDropdown").show();
  $(".clickOnePara").click(function() {
      $(".divOneDropdown").slideToggle(777);
      if ( $(".divTwoDropdown").css("display") != "none" ) {
          $(".divTwoDropdown").slideUp(777);
      }
  });
});

</script>

<script type="text/javascript">

$(document).ready(function(){
  $(".clickTwoPara").click(function() {
      $(".divTwoDropdown").slideToggle(777);
      if ( $(".divOneDropdown").css("display") != "none" ) {
          $(".divOneDropdown").slideUp(777);
      }
  });
});

</script>

<script type="text/javascript">

function flickColor1() {

  document.getElementById("dropButtonTxt1").style.color="white";
  document.getElementById("dropButtonTxt2").style.color="gray";

  }

  function flickColor2() {

  document.getElementById("dropButtonTxt2").style.color="white";
  document.getElementById("dropButtonTxt1").style.color="gray";

  }

</script>

<style type="text/css">

.divOneDropdown, .clickOnePara {
  background: none repeat scroll 0 0 transparent;
  cursor: pointer;
  margin: 0;
  padding: 5px;
  position: relative;
  text-align: center;
  top: 5px;
}

.clickOnePara{
  background-color: transparent;
  width: 200px;
  float: left;
}

.divTwoDropdown, .clickTwoPara {
  background: none repeat scroll 0 0 transparent;
  cursor: pointer;
  margin: 0;
  padding: 5px;
  position: relative;
  text-align: center;
  top: 5px;
}

.clickTwoPara{
  background-color: transparent;
  width: 200px;
  float: left;
  left: 4px;
}

.divOneDropdown {
  display: none;
  height: 260px;
  top: 28px;
  overflow: hidden;
}

.divTwoDropdown {
  display: none;
  height: 260px;
  top: 28px;
  overflow: hidden;
}

#contained{
  /*border: black solid 2px;*/
  width: 800px;
  height: 700px;
  position: relative;
  margin: auto;
}

#topNavs{
  position: relative;
  left: 0px;
  /*width: 100%;*/
  padding-bottom: 0px;
}

#contentDrops{
  padding-top: 20px;
}

/* Below is the Dropdown Nav Styles */

#dropButtons{

}

#dropNavButton1{
  height: 31px;
  left: 121px;
  padding-left: 37px;
  position: absolute;
  width: 504px;
  z-index: 5;
}

#dropNavButton1 a {
  display: block;
  height: 31px;
  width: 248px;
  background: url(Work/Sprites/ProcedureAndRecover.png) 0 0 no-repeat;
  text-decoration: none;
}

#dropNavButton1 a:hover {
  background-position: -252px 0;
  color: #FFFFFF;
}

#dropNavButton1 a:active {
  background-position: 0px 0;
  color: #DDDDDD;
}

/* a:link -  - unvisited link */
/* a:visited -  - visited link */
/* a:hover -  - mouse over link */
/* a:active -  - selected link */

#dropNavButton2{
  height: 31px;
  left: 376px;
  padding-left: 37px;
  position: absolute;
  width: 503px;
  z-index: 5;
}

#dropNavButton2 a {
  display: block;
  height: 31px;
  width: 248px;
  background: url(Work/Sprites/SafetyAndEffects.png) 0 0 no-repeat;
  text-decoration: none;
}

#dropNavButton2 a:hover {
  background-position: -252px 0;
}

#dropNavButton2 a:active {
  background-position: 0px 0;
  color: #DDDDDD;
}

/* a:link -  - unvisited link */
/* a:visited -  - visited link */
/* a:hover -  - mouse over link */
/* a:active -  - selected link */

#dropButtonTxt1{
  font-size: 16px;
  font-family: 'LaneB';
  padding-left: 0px;
  padding-top: 6px;
}

#dropButtonTxt2{
  font-size: 16px;
  font-family: 'LaneB';
  padding-left: 0px;
  padding-top: 6px;
}

/* Photo Gallery - Text not associated with above sprite */

#dropNavButton1 a:link{
  color: #FFFFFF;
}

#dropNavButton1 a:visited{
  color: #FFFFFF;
}

/* Contact - Text not associated with above sprite */

#dropNavButton2 a:link{
  color: #FFFFFF;
}

#dropNavButton2 a:visited{
  color: #FFFFFF;
}

/* a:link -  - unvisited link */
/* a:visited -  - visited link */
/* a:hover -  - mouse over link */
/* a:active -  - selected link */

/* Dropdown Nav Styles END */


/* Complimentary Consultation Button - START */

.compConsult{
  background: url("Work/Images/ComplimentaryConsultation.png") no-repeat scroll 0 0 transparent;      
  background-color: #000000;
  height: 38px;
  left: 33%;
  padding-left: 0;
  position: relative;
  width: 262px;
  z-index: 5;
}

.compConsult a {
  display: block;
  height: 31px;
  width: 248px;
  text-decoration: none;
}

.compConsult a:hover {
  background-position: -252px 0;
  color: #FFFFFF;
}

.compConsult a:active {
  background-position: -504px 0;
  color: #DDDDDD;
}

/* a:link -  - unvisited link */
/* a:visited -  - visited link */
/* a:hover -  - mouse over link */
/* a:active -  - selected link */

.compConsult a:link{
  color: #FFFFFF;
}

.compConsult a:visited{
  color: #FFFFFF;
}

/* a:link -  - unvisited link */
/* a:visited -  - visited link */
/* a:hover -  - mouse over link */
/* a:active -  - selected link */

.compConsultTxt{
  font-family: 'LaneB';
  font-size: 18px;
  padding-top: 6px;
  position: absolute;
  right: 16px;
  width: 230px;
}


/* Complimentary Consultation Button - END */

</style>
</head>

<body>
<div id="contained">

<div id="topNavs">

<div id="dropNavButton1">
  <p class="clickOnePara"><a href="#" onClick="flickColor1()"><span id="dropButtonTxt1">PROCEDURE AND RECOVERY</span></a></p>
</div>

<div id="dropNavButton2">
  <p class="clickTwoPara"><a href="#" onClick="flickColor2()"><span id="dropButtonTxt2">SAFETY AND SIDE EFFECTS</span></a></p>
</div>

</div>

<div id="contentDrops">
<div class="divOneDropdown">

  <p>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam justo est, 
  consequat vel rutrum ut, venenatis sit amet erat. In placerat tellus nunc, 
  et placerat arcu. Phasellus dignissim leo sed dolor dapibus quis auctor dui 
  vestibulum. Sed elit enim, congue et laoreet a, molestie in neque. Fusce 
  ullamcorper sapien ut tellus dictum id sollicitudin nunc congue. 
  Pellentesque posuere ultrices aliquam. Pellentesque habitant morbi tristique 
  senectus et netus et malesuada fames ac turpis egestas. Aliquam laoreet lectus 
  et libero luctus mattis. Sed ac laoreet odio. Mauris nec cursus dui. 
  Curabitur tincidunt pretium quam, a iaculis velit porta nec. 
  </p>

  <div class="compConsult">
    <a href="#"><span class="compConsultTxt">Complimentary Consultation</span></a>
  </div>

  <p>
  Curabitur dignissim leo sed dolor dapibus quis auctor dui 
  vestibulum.
  <br /><br />
  Sed ac laoreet odio. Mauris nec cursus dui.
  </p>
</div>

<div class="divTwoDropdown">
  <p>
  Phasellus dignissim leo sed dolor dapibus quis auctor dui 
  vestibulum. Sed elit enim, congue et laoreet a, molestie in neque. Fusce 
  ullamcorper sapien ut tellus dictum id sollicitudin nunc congue. 
  Pellentesque posuere ultrices aliquam. Pellentesque habitant morbi tristique 
  senectus et netus et malesuada fames ac turpis egestas.
  </p>

  <div class="compConsult">
    <a href="#"><span class="compConsultTxt">Complimentary Consultation</span></a>
  </div>

  <p>
  Sed elit enim, congue et laoreet a, molestie in neque.
  <br /><br />
  In placerat tellus nunc, et placerat arcu.
  </p>
</div>

</div>
</div>
</body>
</html>
  • 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-23T15:03:37+00:00Added an answer on May 23, 2026 at 3:03 pm

    I believe I understand what you are asking for. Give this a shot:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    
    <html>
    <head>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
    
    <script type="text/javascript">
        $(document).ready(function () {
            $(".divOneDropdown").show();
            $(".divTwoDropdown").hide();
            ChangeColor()
    
            $(".clickOnePara").click(function () {
                $(".divOneDropdown").slideToggle(777,
                    function () {
                        ChangeColor();
                    }
                );
                $(".divTwoDropdown").hide();
            });
    
            $(".clickTwoPara").click(function () {
                $(".divTwoDropdown").slideToggle(777,
                    function () {
                        ChangeColor();
                    }
                );
                $(".divOneDropdown").hide();
            });
        });
    
        function ChangeColor() {
            if ($('.divOneDropdown').is(':visible')) {
                document.getElementById("dropButtonTxt1").style.color = "white";
                document.getElementById("dropButtonTxt2").style.color = "gray";
            }
            else if ($('.divTwoDropdown').is(':visible')) {
                document.getElementById("dropButtonTxt1").style.color = "gray";
                document.getElementById("dropButtonTxt2").style.color = "white";
            }
            else {
                document.getElementById("dropButtonTxt1").style.color = "gray";
                document.getElementById("dropButtonTxt2").style.color = "gray";
            }
        }
    </script>
    
    <style type="text/css">
    
    .divOneDropdown, .clickOnePara {
      background: none repeat scroll 0 0 transparent;
      cursor: pointer;
      margin: 0;
      padding: 5px;
      position: relative;
      text-align: center;
      top: 5px;
    }
    
    #contained { background-color: lightgray; } 
    
    .clickOnePara{
      background-color: transparent;
      width: 200px;
      float: left;
    }
    
    .divTwoDropdown, .clickTwoPara {
      background: none repeat scroll 0 0 transparent;
      cursor: pointer;
      margin: 0;
      padding: 5px;
      position: relative;
      text-align: center;
      top: 5px;
    }
    
    .clickTwoPara{
      background-color: transparent;
      width: 200px;
      float: left;
      left: 4px;
    }
    
    .divOneDropdown {
      display: none;
      height: 260px;
      top: 28px;
      overflow: hidden;
    }
    
    .divTwoDropdown {
      display: none;
      height: 260px;
      top: 28px;
      overflow: hidden;
    }
    
    #contained{
      /*border: black solid 2px;*/
      width: 800px;
      height: 700px;
      position: relative;
      margin: auto;
    }
    
    #topNavs{
      position: relative;
      left: 0px;
      /*width: 100%;*/
      padding-bottom: 0px;
    }
    
    #contentDrops{
      padding-top: 20px;
    }
    
    /* Below is the Dropdown Nav Styles */
    
    #dropButtons{
    
    }
    
    #dropNavButton1{
      height: 31px;
      left: 121px;
      padding-left: 37px;
      position: absolute;
      width: 504px;
      z-index: 5;
    }
    
    #dropNavButton1 a {
      display: block;
      height: 31px;
      width: 248px;
      background: url(Work/Sprites/ProcedureAndRecover.png) 0 0 no-repeat;
      text-decoration: none;
    }
    
    #dropNavButton1 a:hover {
      background-position: -252px 0;
      color: #FFFFFF;
    }
    
    #dropNavButton1 a:active {
      background-position: 0px 0;
      color: #DDDDDD;
    }
    
    /* a:link -  - unvisited link */
    /* a:visited -  - visited link */
    /* a:hover -  - mouse over link */
    /* a:active -  - selected link */
    
    #dropNavButton2{
      height: 31px;
      left: 376px;
      padding-left: 37px;
      position: absolute;
      width: 503px;
      z-index: 5;
    }
    
    #dropNavButton2 a {
      display: block;
      height: 31px;
      width: 248px;
      background: url(Work/Sprites/SafetyAndEffects.png) 0 0 no-repeat;
      text-decoration: none;
    }
    
    #dropNavButton2 a:hover {
      background-position: -252px 0;
    }
    
    #dropNavButton2 a:active {
      background-position: 0px 0;
      color: #DDDDDD;
    }
    
    /* a:link -  - unvisited link */
    /* a:visited -  - visited link */
    /* a:hover -  - mouse over link */
    /* a:active -  - selected link */
    
    #dropButtonTxt1{
      font-size: 16px;
      font-family: 'LaneB';
      padding-left: 0px;
      padding-top: 6px;
    }
    
    #dropButtonTxt2{
      font-size: 16px;
      font-family: 'LaneB';
      padding-left: 0px;
      padding-top: 6px;
    }
    
    /* Photo Gallery - Text not associated with above sprite */
    
    #dropNavButton1 a:link{
      color: #FFFFFF;
    }
    
    #dropNavButton1 a:visited{
      color: #FFFFFF;
    }
    
    /* Contact - Text not associated with above sprite */
    
    #dropNavButton2 a:link{
      color: #FFFFFF;
    }
    
    #dropNavButton2 a:visited{
      color: #FFFFFF;
    }
    
    /* a:link -  - unvisited link */
    /* a:visited -  - visited link */
    /* a:hover -  - mouse over link */
    /* a:active -  - selected link */
    
    /* Dropdown Nav Styles END */
    
    
    /* Complimentary Consultation Button - START */
    
    .compConsult{
      background: url("Work/Images/ComplimentaryConsultation.png") no-repeat scroll 0 0 transparent;      
      background-color: #000000;
      height: 38px;
      left: 33%;
      padding-left: 0;
      position: relative;
      width: 262px;
      z-index: 5;
    }
    
    .compConsult a {
      display: block;
      height: 31px;
      width: 248px;
      text-decoration: none;
    }
    
    .compConsult a:hover {
      background-position: -252px 0;
      color: #FFFFFF;
    }
    
    .compConsult a:active {
      background-position: -504px 0;
      color: #DDDDDD;
    }
    
    /* a:link -  - unvisited link */
    /* a:visited -  - visited link */
    /* a:hover -  - mouse over link */
    /* a:active -  - selected link */
    
    .compConsult a:link{
      color: #FFFFFF;
    }
    
    .compConsult a:visited{
      color: #FFFFFF;
    }
    
    /* a:link -  - unvisited link */
    /* a:visited -  - visited link */
    /* a:hover -  - mouse over link */
    /* a:active -  - selected link */
    
    .compConsultTxt{
      font-family: 'LaneB';
      font-size: 18px;
      padding-top: 6px;
      position: absolute;
      right: 16px;
      width: 230px;
    }
    
    
    /* Complimentary Consultation Button - END */
    
    </style>
    </head>
    
    <body>
    <div id="contained">
    
    <div id="topNavs">
    
    <div id="dropNavButton1">
      <p class="clickOnePara"><a href="#" ><span id="dropButtonTxt1">PROCEDURE AND RECOVERY</span></a></p>
    </div>
    
    <div id="dropNavButton2">
      <p class="clickTwoPara"><a href="#" ><span id="dropButtonTxt2">SAFETY AND SIDE EFFECTS</span></a></p>
    </div>
    
    </div>
    
    <div id="contentDrops">
    <div class="divOneDropdown">
    
      <p>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam justo est, 
      consequat vel rutrum ut, venenatis sit amet erat. In placerat tellus nunc, 
      et placerat arcu. Phasellus dignissim leo sed dolor dapibus quis auctor dui 
      vestibulum. Sed elit enim, congue et laoreet a, molestie in neque. Fusce 
      ullamcorper sapien ut tellus dictum id sollicitudin nunc congue. 
      Pellentesque posuere ultrices aliquam. Pellentesque habitant morbi tristique 
      senectus et netus et malesuada fames ac turpis egestas. Aliquam laoreet lectus 
      et libero luctus mattis. Sed ac laoreet odio. Mauris nec cursus dui. 
      Curabitur tincidunt pretium quam, a iaculis velit porta nec. 
      </p>
    
      <div class="compConsult">
        <a href="#"><span class="compConsultTxt">Complimentary Consultation</span></a>
      </div>
    
      <p>
      Curabitur dignissim leo sed dolor dapibus quis auctor dui 
      vestibulum.
      <br /><br />
      Sed ac laoreet odio. Mauris nec cursus dui.
      </p>
    </div>
    
    <div class="divTwoDropdown">
      <p>
      Phasellus dignissim leo sed dolor dapibus quis auctor dui 
      vestibulum. Sed elit enim, congue et laoreet a, molestie in neque. Fusce 
      ullamcorper sapien ut tellus dictum id sollicitudin nunc congue. 
      Pellentesque posuere ultrices aliquam. Pellentesque habitant morbi tristique 
      senectus et netus et malesuada fames ac turpis egestas.
      </p>
    
      <div class="compConsult">
        <a href="#"><span class="compConsultTxt">Complimentary Consultation</span></a>
      </div>
    
      <p>
      Sed elit enim, congue et laoreet a, molestie in neque.
      <br /><br />
      In placerat tellus nunc, et placerat arcu.
      </p>
    </div>
    
    </div>
    </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit: original question below, but I revise it now that I have some code
I have a question, here are two classes below: class Base{ public: virtual void
I have a figure below: And my question is that the objects in Array
I have a simple but subtle question. Below you see two different declaration variants
My question is essentially that I am trying to make a universal Ajax function
I have a question which is described below: What problems would arise for testing
I have a question, I have value as below which I set in an
I have a question about stored procedures in Oracle. Below is the stored procedure
Problem solved, see below Question I'm working in Flex Builder 3 and I have
I have been given the below .NET question in an interview. I don’t know

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.