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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:52:31+00:00 2026-06-14T16:52:31+00:00

For this collapsible menu in this page: http://2ddige.com/temps/Services/proteomics%202d_dige_copy%281%29.html What changes need to be made

  • 0

For this collapsible menu in this page:
http://2ddige.com/temps/Services/proteomics%202d_dige_copy%281%29.html

What changes need to be made in the code so that only the “Gel-Based Proteomics” section is expanded and the other 3 categories collapsed?
Javascript:

// Appear/Disappear
            $('#menu4 > li > a.expanded + ul').show();
            $('#menu4 > li > a').click(function() {
                $(this).toggleClass('expanded').toggleClass('collapsed').parent().find('> ul').toggle();
            });
            $('#example4 .expand_all').click(function() {
                $('#menu4 > li > a.collapsed').addClass('expanded').removeClass('collapsed').parent().find('> ul').show();
            });
            $('#example4 .collapse_all').click(function() {
                $('#menu4 > li > a.expanded').addClass('collapsed').removeClass('expanded').parent().find('> ul').hide();
            });

HTML: the expanded state is governed by the class called “expanded

The CSS:
.leftmenu a.expanded {
background: url(‘../Images/collapse8.png’) no-repeat 50%;
line-height: 35px;
color: #333333;
font-size: 11px;
width: 243px;
padding-left: 30px;

    }
    .leftmenu a.collapsed {
        background: url('../Images/expand8.png') no-repeat 50%;
        line-height: 35px;
        color: #333333;
        font-size: 11px;
        width: 243px; 
        padding-left:30px;
}

I tried changing the class to “collapsed” but all it does it change the background image and the block is still expanded.

Any help is appreciated. Thanks.

  • 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-14T16:52:32+00:00Added an answer on June 14, 2026 at 4:52 pm

    If you change the class of the menu items you want closed to collapsed then you can add the following line in the javascript to have the menus closed on load:

    $('#menu4 > li > a.collapsed + ul').hide();
    

    Your javascript should now look like this:

    // Appear/Disappear
    $('#menu4 > li > a.expanded + ul').show();
    $('#menu4 > li > a.collapsed + ul').hide();
    $('#menu4 > li > a').click(function() {
        $(this).toggleClass('expanded').toggleClass('collapsed').parent().find('> ul').toggle();
    });
    $('#example4 .expand_all').click(function() {
        $('#menu4 > li > a.collapsed').addClass('expanded').removeClass('collapsed').parent().find('> ul').show();
    });
    $('#example4 .collapse_all').click(function() {
        $('#menu4 > li > a.expanded').addClass('collapsed').removeClass('expanded').parent().find('> ul').hide();
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've taken the MVC introduction ( http://dev.sencha.com/deploy/ext-4.0.7-gpl/docs/index.html#!/guide/application_architecture ) and tried to modify it to
I am using following a tutorial from here: http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/ This is the script I
This .aspx page has a very nice set of collapsible sections with little +
I customize a collapsible sidebar from this article (http://devheart.org/articles/jquery-collapsible-sidebar-layout/) for my own project But
I have a collapsible content like this http://jsfiddle.net/coderslay/Ae5CU/ In that the Summary is aligned
I'm using this http://www.i-marco.nl/weblog/jquery-accordion-menu/ accordion menu. Problem is, is that the main-menu links only
I've created collapsible links for navigating my page. All menu items in my navigation
My markup looks like this: <ul class=menu collapsible> <li class='expand sectionTitle home'> <a class='clicker'
I have a collapsible menu item that is defined in XML like this: <item
So what I want is this (Just the collapsible part): http://www.primefaces.org/showcase-labs/ui/layoutEvents.jsf;jsessionid=238C388CE45C77A9B90898A82F2340EA With 2 differences.

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.