Team:UCL London/Photo Gallery

From 2010.igem.org

(Difference between revisions)
m
Line 2: Line 2:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
-
jQuery.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=53364422@N06&format=json",
+
jQuery.getJSON('http://api.flickr.com/services/feeds/photos_public.gne?id=53364422@N06&format=json',
-
        function(data){
+
function(data){
-
          $.each(data.items, function(i,item){
+
  $.each(data.items, function(i,item){
-
            $("<img/>").attr("src", item.media.m).attr("rel", "gallery").wrap('div').parent().addClass('gallery-item').appendTo("#gallery");
+
var picture = item.media.m;
-
            if ( i == 3 ) return false;
+
var full = picture.str_replace('_m.jpg', '_b.jpg');
-
          });
+
var html = '<div class="gallery-item"><a href="' + full + '" title="' + item.title + '"><img src="' + picture + '" /></a></div>';
-
        });</script>
+
$(html).appendTo('#gallery');
 +
  });
 +
});
 +
 
 +
</script>

Revision as of 12:19, 28 August 2010

UCL IGEM 2010

RETURN TO IGEM 2010

Retrieved from "http://2010.igem.org/Team:UCL_London/Photo_Gallery"