Skip to content

Instantly share code, notes, and snippets.

@chrisjdavis
Created December 29, 2013 18:19
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 chrisjdavis/8173116 to your computer and use it in GitHub Desktop.
Save chrisjdavis/8173116 to your computer and use it in GitHub Desktop.
// an array to hold our parsed shots.
var str = [];
// next we iterate over the shots and find the URL we want to update.
var shots = function() {
$.getShotsByPlayerId( "popular", function(data) {
$.each(data.shots, function( i, shot ) {
var shot_url = shot.image_image_url.replace("http", "https");
str.push('<li><a href="' + shot.url + '"><img src="' + shot_url+ '" alt="' + shot.title + '">');
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment