Robert Oates

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromRobert Oates
ToMe
SubjectNested list collapsing script parent style change
Date19 June 2007 16:22
Hi,
I have been playing around with your nested list collapsing script, (an
excellent script btw :D), have got it to work almost exactly how I want it
to, with one exception..

For me, it would be ideal if upon clicking a parent link (the +- ones that
open the sub menus) if this link could change style, specifically the
background image. (then on closing the original style would be reapplied) -
I have no problem switching styles when the user presses a link, but since
there is no visible link in the html code I cant assign an id / onclick
event to make the switch..

Scanning throught the code it seems the link is dynamically generated? - Is
there any way this background style for the parent link can be toggled as it
is pressed?

Many thanks

-- 
Robert Oates
FromMe
ToRobert Oates
SubjectRe: Nested list collapsing script parent style change
Date20 June 2007 13:45
Robert,

> For me, it would be ideal if upon clicking a parent link (the +- ones that
> open the sub menus) if this link could change style, specifically the
> background image.

The script cannot do this, unfortunately, but some of my readers have
worked out some ways to make it work so that some things can change,
such as the +/- image, etc. This is done based on when the links are
clicked, so you may be able to adapt their work.

I have linked to their experiments on this page:
http://www.howtocreate.co.uk/tutorials/jsexamples/listCollapseExample.html
Nisad's demonstration is the closest to what you need.


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.