Anonymous

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromAnonymous
ToMe
Subject:) Nested list collapsing script !!
Date5 December 2003 15:09
Hello,

Your menu is great !! it's exactly the king of thing
I'm looking for. I tried it for few hours and it's
working great. Anyway, I send you an email because I
have just one question about your wonderful DOM code
:) ! 

=> when you open a "folder" (for example "+ book 3"),
I would like to open the folder to see "Chapter 1,
chapter2 - ...", but I need also to have a link on this
menu ! I tried to modify your code but I can't get
something to work. :) Do you know any solutions
for that ?

I'm sure that many people like me should be interested
of we can have links on nodes. Do you thing it's
possible ? 

Anyway THANKS YOU for your help !!!!!!!!!!!

Anon
FromMe
ToAnonymous
SubjectRe: :) Nested list collapsing script !!
Date5 December 2003 15:46
Happy you like the script.

to do what you want, I think you need to replace the lines:

var theHTML = y[x].innerHTML.substr(0,y[x].innerHTML.toUpperCase().indexOf('<'+oT));
while( !y[x].childNodes[1].tagName || y[x].childNodes[1].tagName.toUpperCase() != oT ) {

with (remove line-wrapping in the 'while' loop)

var theT = y[x].innerHTML.toUpperCase().indexOf('<'+oT);
var theA = y[x].innerHTML.toUpperCase().indexOf('<A');
if( theA + 1 && theA < theT ) {
  var theHTML = y[x].innerHTML.substr(0,theA);
} else {
  var theHTML = y[x].innerHTML.substr(0,theT);
}
while( !y[x].childNodes[1].tagName || (
   y[x].childNodes[1].tagName.toUpperCase() != oT &&
    y[x].childNodes[1].tagName.toUpperCase() != 'A' ) ) {


hope this helps. If you have any problems, please contact me again, but I
will be unable to reply until monday.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromAnonymous
ToMe
Subject:) Nested list collapsing script !!
Date13 February 2004 17:16
Anonymous,

I know it's been a while, but I finally decided to update the nested list
collapsing script. It now works with links in the branch heading, just like
you requested (I noticed the script I sent you before did not actually
work).

http://www.howtocreate.co.uk/jslibs/

Hope you find this useful

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.