Create a gist now

Instantly share code, notes, and snippets.

// 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