Skip to content

Instantly share code, notes, and snippets.

@prophile
Forked from fables-tales/gist:4155116
Created November 27, 2012 16:25
Show Gist options
  • Save prophile/4155243 to your computer and use it in GitHub Desktop.
Save prophile/4155243 to your computer and use it in GitHub Desktop.
for (var i = 0; i < obj["userids"].length; i++) {
(function(userid) {
$.get("user/" + userid, {"token":token}, function(resp, userid) {
var user_name = JSON.parse(resp)["full_name"];
build += "<li><a class='user' id='user-" + userid + "' href='#show-" + userid + "'>" + user_name + "</a></li>";
remaining -= 1;
if (remaining == 0) {
make_users_list(obj, build);
hide_spinner();
$("#login").hide();
$("#college").show();
}
});
})(obj["userids"][i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment