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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:51:19+00:00 2026-06-06T09:51:19+00:00

I created one accordion menu, issue is I am using .next on li but

  • 0

I created one accordion menu, issue is I am using .next on li but the div are not slideToggle. and I want this time to make it like accordion menu.

  1. Want to open the div when I will click on parent li,
  2. When I click on the other li it’s div will slide but other li div should be close.

Here is the demo link: http://jsfiddle.net/H4ueq/. Please help me.

  • 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-06T09:51:22+00:00Added an answer on June 6, 2026 at 9:51 am

    You can just use children(“div”) instead of next(), since it’s the child of the clicked li element that you want to slide-toggle. Use slideUp and slideDown instead of toggle, that will produce the accordion functionality.

    See here:

    http://jsfiddle.net/45Yab/3/

    $("ul#accordian>li").click(function() {
        $("#accordian").find("div[class=details]").slideUp("slow");
        $(this).children("div[class=details]").slideDown("slow");
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want create an accordion control similar to one created using AJAX http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Accordion/Accordion.aspx where
I created one GWT webapplication project.Inthat i want to create servlet program,but in that
This is a funny one... I have created a mootools accordion with tabs, each
I created one application, its working fine. I want to support my application in
I've created one Google spread sheet and I want to find the ID of
Created an Accordion side bar using jQuery 1.2.6. I cannot access newer version of
I'm using primefaces' accordion panel. Inside the tabs i have forms which are created
I have created one NSarray , Now I want to display it's data in
I created a simple user control using the AJAX Control Toolkit Accordion, LinkButton, and
I am using jQuery to produce an accordion effect in a menu I have

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.