Hello All,
Is it possible to tweek the Simple Tree Menu javascript so that when a user clicks on a folder to open it, all the other folders will automaticly close? Due to space limitations, i can only have one folder open at a time.
Thank you
Hello All,
Is it possible to tweek the Simple Tree Menu javascript so that when a user clicks on a folder to open it, all the other folders will automaticly close? Due to space limitations, i can only have one folder open at a time.
Thank you
did you found a solution to this problem yet ?
i'm having the same issue.![]()
Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
Simple Tree Menu
http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
Same question as the first poster - can someone work some beautiful magic on this so only one folder is open at a time?
Would be much appreciated. Thanks in advance.![]()
Hi all,
I have maybe solved your problem. But if you use this modification you can just close the root nodes by clicking on another node. If you try to click on the close icon of a root node, nothing happens.
Open the simplemenutree.js and search for "ulelement.parentNode.onclick=function(e){" then add this code below on top
Modification:
You must replace "treemenu1" with your treeid.PHP Code:ulelement.parentNode.onclick=function(e){
var submenu=this.getElementsByTagName("ul")[0]
//....................................The modification starts below .....................
if (this.getElementsByTagName("ul")[0].parentNode.parentNode.parentNode.tagName=="TD") {
ddtreemenu.flatten("treemenu1", "contact")}
P.S: I have also attached the full js file
Bookmarks