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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:01:18+00:00 2026-06-15T23:01:18+00:00

I am currently working on a project and I want to create a HTML

  • 0

I am currently working on a project and I want to create a HTML help page to provide my users with help and advice on how to use the app.

What I want to achieve is a tree layout so along the left hand side it has all the titles with a plus symbol next to it. Then when the user clicks on the plus button or on the text it expands with related content to that section. If the user then clicks it again, then all of the items that were shown are now re-hidden.

I haven’t been able to find any decent tutorials on how I can do this.

Thanks for any help you can provide.

  • 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-15T23:01:19+00:00Added an answer on June 15, 2026 at 11:01 pm

    I took a few moments to build up a quick tree system as you described. Fun little exercise. Copy and paste, open in your browser (I’m using FireFox). Change the +/- symbols in the DIV tags to images if you like. Adjust the CSS margins and paddings to make it all fit seamlessly. Hope this helps.

    Good Luck.

    <html>
    <head>
      <style type="text/css">
    
        div#tree ul { margin:0 0 0 20px; padding:0; list-style-type:none; }
        div#tree ul { display:none; }
        div#tree li>div { display:inline; margin-right:5px; cursor:pointer; }
        div#tree label:hover { text-decoration:underline; cursor:pointer; }
        div#tree>ul { display:block; }
    
      </style>
    
      <script src="http://code.jquery.com/jquery-latest.js"></script>
    
      <script>
        $(document).ready(function () {
            //Set plus sign for all sub menus
            $('li:has("ul")>div').html('&plus;');
    
            //Handle plus/minus tree expansion
            $('li>div').on('click', function (e) {
                if($(this).parent('li').hasClass('selected')) {
                    $(this).siblings('ul').slideUp();
                    $(this).parent('li').removeClass('selected');
                    $(this).html('&plus;');
                } else {
                    $(this).siblings('ul').slideDown();
                    $(this).parent('li').addClass('selected');
                    $(this).html('&minus;')
                }
            })
    
            //Handle tree item link stored as LI data attribute
            $('li>label').on('click', function (e) {
                //This is your URL, URI, Link, Location, etc
                alert($(this).parent('li').attr('data-location'))
            })
    
        });
      </script>
    
    </head>
    <body>
    
        <div id="tree">
            <ul>
                <li data-location=""><div>&lfloor;</div><label>First Level Item1</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item2</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item3</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item4</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item5</label>
                    <ul>
                        <li data-location=""><div>&lfloor;</div><label>Second Level Item1</label></li>
                        <li data-location=""><div>&lfloor;</div><label>Second Level Item2</label></li>
                        <li data-location=""><div>&lfloor;</div><label>Second Level Item3</label></li>
                        <li data-location=""><div>&lfloor;</div><label>Second Level Item4</label></li>
                        <li data-location=""><div>&lfloor;</div><label>Second Level Item5</label>
                            <ul>
                                <li data-location=""><div>&lfloor;</div><label>Third Level Item1</label></li>
                                <li data-location=""><div>&lfloor;</div><label>Third Level Item2</label></li>
                                <li data-location=""><div>&lfloor;</div><label>Third Level Item3</label></li>
                                <li data-location=""><div>&lfloor;</div><label>Third Level Item4</label></li>
                                <li data-location=""><div>&lfloor;</div><label>Third Level Item5</label></li>
                                <li data-location=""><div>&lfloor;</div><label>Third Level Item6</label></li>
                                <li data-location=""><div>&lfloor;</div><label>Third Level Item7</label></li>
                            </ul>
                        </li>
                        <li data-location=""><div>&lfloor;</div><label>Second Level Item6</label></li>
                    </ul>
                </li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item6</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item7</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item8</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item9</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item10</label></li>
                <li data-location=""><div>&lfloor;</div><label>First Level Item11</label></li>
            </ul>
        </div>
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What do I want to achieve? We are currently working on a PHP project
I am currently working on android project where I want to have a text
I'm currently working on a project where I want to control a microprocessor (Arduino)
I'm currently working on a project in iOS where I want the UItouch command
I'm currently working on a small project to learn Linq where I want to
I am currently working on a small ecommerce project. I want to show a
I am currently working on Project Euler for fun, and use Haskell for practicing.
I'm currently working on a project which uses XSL-Transformations to generate HTML from XML.
I'm currently working on a toy project in Django. Part of my app allows
For a project I'm working on I want to create an on-screen keyboard. So

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.