Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Javascript collapsible tree

Featured Replies

Hi,

I am using code from Dynamic Drive to create a list which is expandable (a collapsible tree). The script is great, but I need to modify it slightly for our needs, and I just can't work out how - I'm sure it's straightfoward, but the .js is like doubledutch to me.

 

The draft page is here:

http://www.cyrrus.co.uk/capabilities.php

 

It all works fine, but I need to be able to expand all subfolders when the first level is clicked upon. At the moment, the user needs to click on each lower level to expand them. So for example, when the ATM item is clicked, the Control Tower and Airfield Operation items also open.

 

This is the link to the original code:

http://www.dynamicdrive.com/dynamicindex1/navigate1.htm - I haven't changed anything in the .js or .css file.

 

Any direction would be great, or if anyone has any ideas of a better way to do it, I'd be really grateful.

 

Many thanks

 

Vicky

  • Author

To save anyone time who may wish to post, I have fixed this problem now thanks to a really helpful guy on the DD forum.

 

Thanks for taking the time to read this post anyway.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.