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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:02:33+00:00 2026-06-17T01:02:33+00:00

I have a nested menu with content divs that toggle onclick. By default, when

  • 0

I have a nested menu with content divs that toggle onclick. By default, when a page loads, the menu shows with all Content divs hidden. I am trying to show when the page loads (without any clicks) the Content div that is active (class=”active”).
This is my HTML:

<ul> 
 <li><h3 class="toggle_action"> Mailing Lists</h3>  // toggle trigger
  <ul class="div_toggle">  // the content div
   <li><h3 class="toggle_action"><a href="/list" class="active">Overview</a></h3></li>
   <li>...another link...</li>
  </ul>
 </li>
</ul>

This is my jQuery:

(function ($) {
   $(document).ready(function() {
        $(".div_toggle").slideUp();
        $(".active").Show();
        $(".toggle_action").click(function(){
            $(this).next(".div_toggle").slideToggle("slow");
        });         
    });    
  })(jQuery);

I’ve searched for hours but can only find code that shows/hide onclick, and I must be missing something to do this on page load only. Please help point me in right direction!

  • 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-17T01:02:36+00:00Added an answer on June 17, 2026 at 1:02 am

    One thing that jumps out at me is that you are using $(‘.active’).Show() which is not a jQuery Method. You want $(‘.active’).show(). Notice the lower case “S”.

    In addition, you didn’t close the H3 tag, and you are hiding the parent element.

    Simple example with same logic:

    <div class="a">
          <div class="b">Apple</div>
          <div class="c">Pear</div>
    </div>
    
    $(function(){
      $('.a').slideUp();
      $('.b').show();
    
      // No matter what you will never see .b or .c.  They will always be hidden
         when .a slides up
    
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image that has a nested context menu defined in the XAML
I have a CSS <ul> <li> nested menu that works perfectly in IE 8
I have a nested ul menu structure that starts off like this: <div id=left>
I have nested li, which is for horizontal subnav menu. I am trying to
We have a nested menu within our page where drag and drop is enabled
I have a nested master page scenario where I have a menu both in
I have a nested CSS menu that I can't get the submenus to come
I have a nested form that has a select dropdown menu. How can I
I have a page menu being generated that will be similar in structure to
I have a menu on the left of my page that is made of

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.