Team:TU Delft/fb display
From 2010.igem.org
(Difference between revisions)
Line 8: | Line 8: | ||
function fb_photos(response) { | function fb_photos(response) { | ||
- | |||
- | |||
- | |||
- | |||
- | |||
var n = 6; // select 6 random pictures | var n = 6; // select 6 random pictures | ||
var imghtml = ""; | var imghtml = ""; | ||
- | for(var | + | for(var j=0;j<n;j++) { |
- | var x = Math.random()*response.data.length; | + | var x = Math.round( Math.random()*response.data.length ); |
var imgSmall = response.data[x].picture; | var imgSmall = response.data[x].picture; | ||
imghtml += '<img src=\"'+imgSmall+'">'; | imghtml += '<img src=\"'+imgSmall+'">'; |
Revision as of 00:38, 16 June 2010