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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:40:07+00:00 2026-05-16T11:40:07+00:00

On a menu, I want to apply slide-toggle or something like that in jQuery

  • 0

On a menu, I want to apply slide-toggle or something like that in jQuery where all the children of li are hidden by default. When li is clicked it shows it’s direct children. Showing children of li also hides all other children.

<ul id="navlist">
    <li>Information 1<ul>
        <li>apple1</li>
        <li>Mango1</li>
        <li>Banana1</li>
        </ul>
    </li>
    <li>Information 2<ul>
        <li>apple2</li>
        <li>Mango2</li>
        <li>Banana3</li>
        </ul>
    </li>
    <li>Information 3<ul>
        <li>apple3</li>
        <li>Mango3</li>
        <li>Banana3</li>
        </ul>
    </li>
  • 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-16T11:40:07+00:00Added an answer on May 16, 2026 at 11:40 am
    <ul id="MyMenu">
      <li>
        info 1
        <ul class="inner">
           <li>apple1</li>
           <li>mango1</li>
           <li>banana1</li>
        </ul>
      </li>
      <li>
        info 2
        <ul class="inner">
           <li>apple2</li>
           <li>mango2</li>
           <li>banana2</li>
        </ul>
      </li>
      <li>
        info 3
        <ul class="inner">
           <li>apple3</li>
           <li>mango3</li>
           <li>banana3</li>
        </ul>
      </li>
    </ul>
    
    $(function(){
      $('#MyMenu > li').click(function(){
        $('#MyMenu .inner').hide();  //hide all
        $(this).find('ul.inner').show();  // show the clicked submenu
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Next to file menu i want to add a search menu that will have
I want that the menu i have created for testing entries should come in
I would like to apply a CSS stylesheet to all page views in a
i want to apply the CSS only first li but :first-child apply to all
I want to apply Jquery UI Autocomplete with multiple values to one registration forms
I want to apply Jquery UI Autocomplete with multiple values to one registration forms
I have a menu item that I want to show/hide only if the user
I want to apply Jquery UI Autocomplete with multiple values to one registration forms
I have five button and a menu strip, I want to apply the color
I have this function that returns a random color, but I want to apply

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.