self-calling function inside jQuery plugin
问题 I am generating a tree (nested UL list) with javascript using the self-calling function below. I might add that it is within a jQuery plugin, if that is at all relevant to the issue (perhaps it might be?). The variable gd contains a json/array sniffed from a filestructure, so it's basically folders and images's names, and some more data (like the self-explainatory isFolder attribute etc.) for (i = 0; i < gd.length; ++i) { is interrupted by the self-call. var drawTree = function(self,parent){