javascript - Using the following tree navigation script, how to make the heading trigger the drop down? -
we're using following script have dropdown navigation:
http://www.onlinetools.org/tools/dom-tree-menu-puredom/#
however, drop down triggered when [+] or [-] clicked. happen headings trigger dropdown. like:
[+] heading [+] heading 2 [+] heading 3
when click on [+] , word "heading" drop down list appear so:
[-] heading -- content 1 -- content 2 -- content 3 [+] heading 2 [+] heading 3
currently, [+] triggers drop down , "heading" merely allows put normal link.
linkparent:false
change linkparent:true
if change true have feeling allow heading linking too.
if take @ line 41 sets click handler. first tag [0] arrow , second tag [1] believe title
pde.addevent(parentli.getelementsbytagname('a')[0],'click',pde.showhide,false); parentli.getelementsbytagname('a')[0].onclick=function(){return false;} // safari hack if(pde.linkparent){ pde.addevent(parentli.getelementsbytagname('a')[1],'click',pde.showhide,false); parentli.getelementsbytagname('a')[1].onclick=function(){return false;} // safari hack }
hint: have nice comment in beginning of script.
// boolean make parent link collapse section or not linkparent:false,
Comments
Post a Comment