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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:21:51+00:00 2026-06-10T10:21:51+00:00

I have a hide/show navigation working but can’t seem to figure out how to

  • 0

I have a hide/show navigation working but can’t seem to figure out how to hide the main div that contains all the children divs until one of the links in the navigation is selected.

Please see my fiddle: http://jsfiddle.net/blahblahAMYblah/KptZ6/

To be clear, I do not just want all the children divs (ie. about, gallery, etc.) hidden at the start, but the main div hidden. Once a link is selected, then the main div should show with only the selected child div showing as well.

  • 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-10T10:21:52+00:00Added an answer on June 10, 2026 at 10:21 am

    I’ve updated your fiddle;

    http://jsfiddle.net/KptZ6/2/

    If you don’t want to change the HTML, the following will hide the main div using javascript. It also hides the children the same way (using .hide())

    http://jsfiddle.net/KptZ6/5/

    $(function() {
        $('#main').hide();
    });
    
    $('body').on('click','nav a', function(e) {
        $('#main').show();
        $('#main').children().hide();
        $($(this).attr('href')).show();
        e.preventDefault();
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a menu with submenus that can be toggled (hide/show type deal). Is
I have a div show hide function which is working fine. when I click
I am trying to figure out how to show/hide a navigation link based on
In Lion, source list group items now have a Hide/Show button that appears when
I have a show/hide toggle working well in multiple instances (thanks to help here
I have done a hide and show of a div element, on clicking a
I have this jquery script which suppose to hide/show div element base on the
I have 3 radio buttons which hide/show some div's. The radio buttons are getting
I have a grid that has multiple rows. I want to hide/show one of
I have a customized show/hide toggle script that I'm using along with CSS3 transitions

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.