I'm still working on this problem, (and I have poured over the jQuery group trying to find any answers,) and I'm realizing that maybe it's not the callback's fault.
I'm thinking it might be more of a problem with (not only me,) but the fact that when you click on any folder in the file tree, the script doesn't seem to know exactly which folder you clicked on? Because it runs through the function over and over for every file within that folder. (for example: if I have 3 files in a folder, it runs 3 times!) And that is not the behavior I want to be happening. I want it to run ONCE no matter how many files are inside an opened folder. When the callback is added, it just multiplies this further and it's getting frustrating. Is there a way to find only the clicked folder? It might have to do with this line: $('img.expandImage', tree.get(0)).click()