im just not sure how to get the desired value within this function Thanks!
temp = exotics[i].split(',');
if ($.inArray(temp[0], tblProbables) != -1) {
item = $("<li><a id='" + temp[0] + "'" + "href='#' >" + temp[1] + "</a></li>");
item.click(function () { GetProbable(temp[0]); });
}
temp[0] is blank because it doesn’t exist within that function space…. so how can i setup the click event so that it calls the function with the proper param?
I have a feeling you’re reusing the
tempvariable somehow.If so, you can just create a new variable scope in a function that returns a function that references the proper scoped variable.