Skip to content

Instantly share code, notes, and snippets.

@nikibrown
Created January 18, 2011 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikibrown/783947 to your computer and use it in GitHub Desktop.
Save nikibrown/783947 to your computer and use it in GitHub Desktop.
// Loop for each entry
$.each(data.Entries, function(entriesIndex, entriesObject) {
// opening list item
// Field3 is the email field on this particular form
if (entriesObject.Field3 != "") {
$("<img />", {
class: "avatar",
src: "http://www.gravatar.com/avatar/" + MD5(entriesObject.Field3)
}).appendTo("#people");
}
// check if twitter name is not empty
if (entriesObject.Field17 != "") {
$("<a />", {
href: "http://twitter.com/" + entriesObject.Field17,
html: "<p>@" + entriesObject.Field17 + "</p>"
}).appendTo("#people");
}
// closing list item
}); // end for each loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment