I guess what the problem is... is the fact that I'm trying to rebind
this click event to the whole .myTree ... and I really just need to be
doing that for the initial time.  Then for every folder I open, it
should only bind the click event to that folder.

I can do that with two functions; is there a way to do that with just
one?

My second function is just like the first one except (I took out the
unnecessary .stopPropagation() and .preventDefault()) for the
parameter that gets a specific folder in the tree -->
this.parentNode.getElementsByTagName('ul')

I don't mind having to use two functions, but I'm just wondering if
there is a way to combine them... all that needs to change is the
first part of this line:   $('.myTree').find('a').bind('click',
function(evt){

But I haven't worked with jQuery for long enough to know how to do
that.  Thanks if there are any ideas, I'll just use two functions for
the time being I guess.

andy

Reply via email to