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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:07:04+00:00 2026-06-19T00:07:04+00:00

I am working on a collapsible panel menu. Everything is looking great except for

  • 0

I am working on a collapsible panel menu. Everything is looking great except for the title in the collapsible panel tab. So, here’s what I’m trying to do, if the collapsible panel content is open, I want the collapsible panel tab to show a specific span class. For example, it will show a minus or (-) sign if it is open. And if it is close, it will show a plus or (+) sign.

Here’s the code:

<div id="CollapsiblePanel1" class="CollapsiblePanel">
    <div class="CollapsiblePanelTab" tabindex="0">
       <span class="closedmenu">+</span>
       <span class="openmenu">-</span>
    </div>
    <div class="CollapsiblePanelContent"> 
       <ul>
          <li><a href="LINK1urlHERE">LINK1titleHERE</a></li>
          <li><a href="LINK2urlHERE">LINK2titleHERE</a></li>
       </ul>
    </div>
</div>
<script type="text/javascript">
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
</script>

Or, if the collapsible panel content is open, I would like the class .closedmenu to have a css of display:none. And if the collapsible panel content is closed, the class .openmenu to have a css of display:none.

In css, the idea is like:

.CollapsiblePanelOpen .CollapsiblePanelTab {
   .closedmenu {display:none;} }
.CollapsiblePanelClosed .CollapsiblePanelTab {
   .openmenu {display:none;} }

But of course, this does not work. So, I think a javascript is needed.

I need a very simple answer to this one, if anyone can, please. Thank you! I hope this question is clear and understandable. 🙂

  • 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-19T00:07:05+00:00Added an answer on June 19, 2026 at 12:07 am

    I’m not familiar with the hooks you can use in Spry, but you could functions like this:

    function clickPlus() {
        document.getElementById("openButton").style.display = "none";
        document.getElementById("closeButton").style.display="inline";
    }
    
    function clickMinus() {
        document.getElementById("openButton").style.display = "inline";
        document.getElementById("closeButton").style.display="none";
    }
    

    And on your spans do something like this:

    <span id="openButton" onclick="clickPlus();">+</span>
    <span id="closeButton" onclick="clickMinus();">-</span>
    

    This all assumes that you start off with specifying display:none; in your css for closeButton.

    EDIT: I changed the code to be a bit more specific, and noted the requirement for display:none; in the css

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I downloaded a jquery collapsible panel script (used as a menu), which I've got
I have a working click-able, collapsible div script: $(document).ready(function() { $(.toggle-content).hide(); $(.byline).click(function() { $(.toggle-content).hide();
Trying to create collapsible / expandable divs using jQuery, but it's not working for
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working on a project using Entity Framework (4.3.1.0). I'm trying to figure out how
I'm trying to make a DataView work (on Ext JS 2.3). Here is the
I had an html template where I added a javascript based collapsible panel. I
I really don't get why this is not working. I want to avoid a
I'm trying to create a CollapsiblePanel control, which is essentially just a panel which
I am working with jQuery UI Accordion and it works great, but I would

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.