Last active
March 18, 2016 09:22
-
-
Save Joseph7451797/cf8139f4932716d6d129 to your computer and use it in GitHub Desktop.
JS Bin// source http://jsbin.com/goyehu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="img-wrapper"></div> | |
<script id="jsbin-source-javascript" type="text/javascript"> | |
fetch('https://dl.dropboxusercontent.com/u/43833728/imgsccreq.json').then(function(response) { | |
return response.json(); // Convert to JSON | |
}).then(function(j) { | |
var nnn = []; | |
var length; | |
var docfrag = document.createDocumentFragment(); | |
if(j instanceof Array) { | |
j.map(function(k) { | |
nnn.push(k.url); | |
}); | |
length = nnn.length; | |
} | |
for(i = 0; i < length; i++){ | |
var t = document.createElement("img"); | |
t.setAttribute("src", nnn[i]); | |
docfrag.appendChild(t); | |
} | |
document.getElementById("img-wrapper").appendChild(docfrag); | |
}).catch(function(err) { | |
console.log(err); // Error :( | |
}); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch('https://dl.dropboxusercontent.com/u/43833728/imgsccreq.json').then(function(response) { | |
return response.json(); // Convert to JSON | |
}).then(function(j) { | |
var nnn = []; | |
var length; | |
var docfrag = document.createDocumentFragment(); | |
if(j instanceof Array) { | |
j.map(function(k) { | |
nnn.push(k.url); | |
}); | |
length = nnn.length; | |
} | |
for(i = 0; i < length; i++){ | |
var t = document.createElement("img"); | |
t.setAttribute("src", nnn[i]); | |
docfrag.appendChild(t); | |
} | |
document.getElementById("img-wrapper").appendChild(docfrag); | |
}).catch(function(err) { | |
console.log(err); // Error :( | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment