Team:DTU-Denmark/Mark/template

From 2014.igem.org

(Difference between revisions)
Line 166: Line 166:
</html>
</html>
 +
 +
 +
$(document).ready(function(){
 +
$("div.thumbinner > a img").slimbox({/* Put custom options here */}, function(el) {
 +
url = el.src;
 +
if (url.indexOf('thumb') != -1) {
 +
url = url.substring(0, url.lastIndexOf('/'));
 +
url = url.replace('/thumb/', '/');
 +
}
 +
description = $(el).parents("div.thumbinner").children("div.thumbcaption").text();
 +
return [url, description];
 +
}, function(el) {
 +
return (this == el);
 +
});
 +
});

Revision as of 12:53, 7 July 2014

{{{1}}}


$(document).ready(function(){ $("div.thumbinner > a img").slimbox({/* Put custom options here */}, function(el) { url = el.src; if (url.indexOf('thumb') != -1) { url = url.substring(0, url.lastIndexOf('/')); url = url.replace('/thumb/', '/'); } description = $(el).parents("div.thumbinner").children("div.thumbcaption").text(); return [url, description]; }, function(el) { return (this == el); }); });