Team:NYU Gallatin
From 2012.igem.org
(Difference between revisions)
Line 17: | Line 17: | ||
</html> | </html> | ||
{{:Team:NYU_Gallatin/Templates/Header_Default}} | {{:Team:NYU_Gallatin/Templates/Header_Default}} | ||
- | <html> | + | <html><nowiki> |
<div id="main-wrapper" class="clearfix"><div id="main" class="clearfix"><div id="main-inner"> | <div id="main-wrapper" class="clearfix"><div id="main" class="clearfix"><div id="main-inner"> | ||
Line 150: | Line 150: | ||
<!--//--><![CDATA[// ><!-- | <!--//--><![CDATA[// ><!-- | ||
- | $ | + | if($('#images').length != 0) { |
- | function displayImages(data) { | + | |
- | + | setTimeout(function() {$.getJSON(flickr_url, displayImages);},1500); | |
- | + | function displayImages(data) { | |
- | + | // Start putting together the HTML string | |
- | + | var htmlString = ""; | |
- | + | ||
- | + | // Now start cycling through our array of Flickr photo details | |
- | + | var k=0; | |
- | + | $.each(data.items, function(i,item){ | |
- | + | if(k == 0) { | |
- | + | // I only want the ickle square thumbnails | |
- | + | // var sourceSquare = (item.media.m).replace("_m.jpg", "_s.jpg"); | |
- | + | var sourceSquare = item.media.m; | |
- | + | var l_sourceSquare = (item.media.m).replace("_m.jpg", "_b.jpg"); | |
- | + | ||
- | + | // Here's where we piece together the HTML | |
- | + | htmlString += '<li><a href="'+l_sourceSquare+'" rel="lightbox">'; | |
- | + | htmlString += '<img title="' + item.title + '" src="' + sourceSquare; | |
- | + | htmlString += '" alt="'; htmlString += item.title + '" />'; | |
- | + | htmlString += ''; | |
- | + | k++; | |
- | + | } | |
- | + | }); | |
- | + | ||
- | + | // Pop our HTML in the #images DIV | |
- | + | $('#images').html(htmlString); | |
+ | |||
+ | // Close down the JSON function call | ||
+ | |||
+ | Drupal.attachBehaviors(); | ||
+ | } | ||
- | |||
} | } | ||
Line 191: | Line 195: | ||
<div id="featured_video"></div> | <div id="featured_video"></div> | ||
<p><a href="/Notebook/Videos" class="more-link">More Videos</a></p> | <p><a href="/Notebook/Videos" class="more-link">More Videos</a></p> | ||
- | + | </div> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</div> | </div> | ||
<div id="block-block-6" class="block block-block"> | <div id="block-block-6" class="block block-block"> | ||
Line 217: | Line 209: | ||
</div></div></div> <!-- /#main-inner, /#main, /#main-wrapper --> | </div></div></div> <!-- /#main-inner, /#main, /#main-wrapper --> | ||
- | </html> | + | </nowiki></html> |
{{:Team:NYU_Gallatin/Templates/Footer_Content}} | {{:Team:NYU_Gallatin/Templates/Footer_Content}} | ||
<html> | <html> |
Revision as of 21:27, 26 September 2012