Skip to content

Instantly share code, notes, and snippets.

@jpcody
Created December 6, 2012 21:04
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 jpcody/4228395 to your computer and use it in GitHub Desktop.
Save jpcody/4228395 to your computer and use it in GitHub Desktop.
$.getJSON(jsonp_url, function(data) {
var membershipList = "";
$('#user').html("<a href=" + data.user_url + ">User</a>");
$('#eea').html("<a href=" + data.eea_url + ">EEA</a>");
$('#status').html("Status: " + data.eea_status);
$('#valid').html("Valid? " + data.valid);
$.each(data.active_memberships, function(name, url){
var listItem = "<li><a href=" + url + ">" + name + "</a></li>"
membershipList += listItem;
});
$('#memberships').html("Active Memberships:<br>" + "<ul>" + membershipList + "</ul>");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment