[jQuery] recursive function that includes event binding

[jQuery] recursive function that includes event binding


trying to do something pretty simple:
1. build a list from an ajax request
2. build a sub-list for the list item on click. this is also made via
ajax request
Clearly, we're talking recursion here, since I'd lik to get away with
just one single function that is kind of a template. All I pass to the
function is a set of name-value pairs, and those create the list label
and a variable for the respective hyperlink.
The tricky bit:
There actually aren't hyperlinks, but rather div elements that need a
click event bound to it. I can make my divs, but the problem is I
can't click them - and I don't want to have to use livequery...
I'm sure someone has done this already and is willing to cut/paste
code? meanwhile I shall keep searching the group for this...
thanks!