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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:28:07+00:00 2026-06-03T07:28:07+00:00

I using Daniel Stocks jQuery-Collapse with cookies, which works great. https://github.com/danielstocks/jQuery-Collapse Hi, does anyone

  • 0

I using Daniel Stocks jQuery-Collapse with cookies,
which works great.

https://github.com/danielstocks/jQuery-Collapse

Hi, does anyone know how I can make one
of the headers a link? So when clicked
it links to another page also containing the menu,
and when this page is loaded, the clicked
menu is expanded showing the sub items.

In the example below, I need fruits to link
to another page and to be expanded at this
page:

 <div class="demo">             
                <h3><a href="default2.html">Fruits</a></h3>
                <ul>
                    <li>Apple</li>
                    <li>Pear</li>
                    <li>Orange</li>
                </ul>
                <h3>Vegetables</h3>
                <ul>
                    <li>Carrot</li>
                    <li>Tomato</li>
                    <li>Squash</li>
                </ul>
                <h3>Colors</h3>
                <ul>
                    <li>Green</li>
                    <li><a href="http://en.wikipedia.org/wiki/Yellow">Yellow</a></li>
                    <li><a href="http://en.wikipedia.org/wiki/Orange_(colour)">Orange</a></li>
                </ul>
            </div>

Any help would be appreciated 🙂

  • 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-03T07:28:09+00:00Added an answer on June 3, 2026 at 7:28 am

    Another problem i’m seeing is that the plugin will ignore the h3 with the link inside it.

    so you’ll need to combine this with a custom show() handler.

    HTML

    <h3 id="fruits" rel="index2.html#fuits">Fruits</h3>
    <ul>
      <li>Apple</li>
       <li>Pear</li>
       <li>Orange</li>
     </ul>
    ...
    

    JS

    $(".demo").collapse({
        head: "h3",
        group: "ul",
        show: function() {
           if($(this).prev().attr('rel')){
               // open a window with the rel value as the location.
               window.location=($(this).prev().attr('rel'));
           }
           $(this).show()
        },
        hide: function(){
           $(this).hide()
        }
    });
    

    Then using the method mentioned by @Andrea simply set the item you want opened in the other page to be active.

    so in this example if the url was #fruits then the item we’d open on load would be the h3 with id=”fruits”

    To do this you can use.

    if(window.hash){
        $("#"+window.hash).addClass('active')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the code to place a linkedIn Follow button (generated here https://developer.linkedin.com/plugins/follow-company
I'm using postgres, and I have a users table which contains users first and
currently I develop a C#.Net application in which I'm using a custom control I
I'm using jQuery Sortable and Knockout to maintain an array. http://jsfiddle.net/daniel_white/KrGY8/3/ Notice when you
Currently using the JQuery UI autocomplete list function JQuery UI - Autocomplete . I
I'm using google translate to translate lots of words which I then store in
I have a graph which I would like to represent using an image on
I am using the Event Subscription Tool, which sits on top of the bissubscribe.exe
Hi having some problem with stdout reading when using subprocess.Popen daniel@desktop:~$ python -V Python
I'm using requests (as adviced by Daniel Roseman) to post on a webform: url

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.