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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:57:01+00:00 2026-06-12T09:57:01+00:00

Basically I’ve been trying to use jQuery to show() and hide() a sub navigation

  • 0

Basically I’ve been trying to use jQuery to show() and hide() a sub navigation in my content. I’ve found code which shows and hides when a button is clicked, however, I’ve been trying to make it so that when one nav button is clicked it will open the content below it but when another nav button in that list is clicked after, it will show that content and hide the previous one.

Any help will be greatly appreciated.

Sub Nav HTML

                        <ul id="subNav">
                            <li>
                                <a class="showSingle" target="1">
                                    BLOMFIELD ROAD, 2012
                                    <img src="images/sub-nav-1.jpg" alt="Blomfield Road 2012" />
                                </a>
                            </li>
                            <li>
                                <a class="showSingle" target="2">
                                    KIDDERPORE GARDENS
                                    <img src="images/sub-nav-2.jpg" alt="Kidderpore Gardens"/>
                                </a>
                            </li>
                            <li>
                                <a class="showSingle" target="3">
                                    BLOMFIELD ROAD, 2010
                                    <img src="images/sub-nav-3.jpg" alt="Blomfield Road 2010" />
                                </a>
                            </li>
                            <li>
                                <a class="showSingle" target="4">
                                    CECILE PARK
                                    <img src="images/sub-nav-4.jpg" alt="Cecile Park" />
                                </a>
                            </li>
                            <li>
                                <a class="showSingle" target="5">
                                    LANSDOWNE ROAD
                                    <img src="images/sub-nav-5.jpg" alt="Landsdowne Road" />
                                </a>
                            </li>
                            <li>
                                <a class="showSingle" target="6">
                                    BLOMFIELD ROAD, 2007
                                    <img src="images/sub-nav-6.jpg" alt="Blomfield Road 2007" />
                                </a>
                            </li>
                            <li>
                                <a class="showSingle" target="7">
                                    HANOVER TERRACE
                                    <img src="images/sub-nav-7.jpg" alt="Hanover Terrace" />
                                </a>
                            </li>
                        </ul>
                  </div> <!--END OF subHeader -->

Content HTML

<div id="div1" class="targetDiv">
                      <div class="content">
                          <p class="projHeader">
                              BLOMFIELD ROAD, 2012
                          </p>
                          <div class="sqBox"></div>
                          <p class="address">
                               2012, Little Venice, London W9
                          </p>
                          <p class="jobDescrip">
                              Complete strip out and refurbishment of 
                              a fire damaged Grade II listed 4 storey building. 
                              Including replacement of fire damaged wall 
                              & floor structures, chemical cleaning to 
                              remove smoke odours and reinstatement to 
                              match original fit out.
                          </p>
                          <p class="projectCompletion">
                              <span class="pcCss">PROJECT COMPLETION</span> <br>
                              April 2011 – February 2012 (10 months)
                          </p>
                          <p class="architect">
                              <span class="title">ARCHITECT</span> <br>
                              <span class="company">Metropolitan Development Consultancy Ltd</span> <br>
                              <a href="www.mdclondon.com"> www.mdclondon.com </a>
                          </p>
                          <div class="spec">
                              <ul>
                                  <li> Control 4 automation system </li>
                                  <li> Bespoke joinery by Ottima </li>
                                  <li> High specification M&amp;E services </li>
                                  <li> Lutron Homeworks lighting system </li>
                                  <li> Poggenpohl kitchen by Nicholas Anthony  </li>
                                  <li> Air conditioning, audio visual & underfloor <br>
                                      heating system automated via Control 4 system.  
                                  </li>
                              </ul>
                         </div> <!-- END OF spec -->
                        </div> <!-- END OF content -->
                        <div class="slideshow">

                        </div><!-- END OF slideshow -->
                </div><!-- END OF div1 -->
                <div id="div2" class="targetDiv">
                  <div class="content">
                          <p class="projHeader">
                              BLOMFIELD ROAD, 2012
                          </p>
                          <div class="sqBox"></div>
                          <p class="address">
                               2012, Little Venice, London W9
                          </p>
                          <p class="jobDescrip">
                              Complete strip out and refurbishment of 
                              a fire damaged Grade II listed 4 storey building. 
                              Including replacement of fire damaged wall 
                              & floor structures, chemical cleaning to 
                              remove smoke odours and reinstatement to 
                              match original fit out.
                          </p>
                          <p class="projectCompletion">
                              <span class="pcCss">PROJECT COMPLETION</span> 
                              April 2011 – February 2012 (10 months)
                          </p>
                          <p class="architect">
                              <span class="title">ARCHITECT</span> <br>
                              <span class="company">Metropolitan Development Consultancy Ltd</span> <br>
                              <a href="www.mdclondon.com"> www.mdclondon.com </a>
                          </p>
                          <div class="spec">
                              <ul>
                                  <li> Control 4 automation system </li>
                                  <li> Bespoke joinery by Ottima </li>
                                  <li> High specification M&amp;E services </li>
                                  <li> Lutron Homeworks lighting system </li>
                                  <li> Poggenpohl kitchen by Nicholas Anthony  </li>
                                  <li> Air conditioning, audio visual & underfloor <br>
                                      heating system automated via Control 4 system.  
                                  </li>
                              </ul>
                            </div> <!-- END OF spec -->
                        </div> <!-- END OF content -->
                        <div class="slideshow">

                        </div><!-- END OF slideshow -->
                    </div> <!--END OF kpg -->
  • 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-12T09:57:02+00:00Added an answer on June 12, 2026 at 9:57 am

    Nice solution called accordion is provided in jQuery addon: jQuery UI.
    Try to see this: http://jqueryui.com/demos/accordion/

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

Sidebar

Related Questions

Basically this is a program which I take a text file with some code
Basically what I'm trying to do is generate an alphanumeric string, which is passed
Basically, I've been trying nXhtml mode, and it's terribly slow and buggy in Emacs
Basically I've made a form in Cakephp 2.1 with a jQuery button that appends
Basically, what I'm trying to create is a page of div tags, each has
Basically the code inside the displayCharityList () works. I decided to put that code
Basically I want to type show and it checks if there is a show
Basically I am writing a simple bit of code to increment every one second
basically I have a function that resizes elements accordingly with jquery triggering the function
Basically I have some simple code that does some things for files and I'm

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.