Team:UNITN-Trento/JS/Gallery

From 2013.igem.org

Revision as of 15:07, 23 September 2013 by Ggirelli (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

$(document).ready(function() { var jmpressOpts = { hash : { use : true } }; $('#jms-slideshow').jmslideshow( $.extend( true , { jmpressOpts : jmpressOpts }, { autoplay : false, arrows : true }));

$("#jms-slideshow .step").each(function() { id = $(this).attr('id'); img = $(this).attr('data-img'); $(".container .sheet .thumbs").append("<a href= class='thumb' data-id='" + id + "'><img src='" + img + "' /></a>"); });

$(".container .sheet a").each(function() { $(this).click(function(e) { e.preventDefault(); window.location.hash = $(this).attr('data-id'); }); }); });