Template:Team:HokkaidoU Japan/script
From 2011.igem.org
(Difference between revisions)
(5 intermediate revisions not shown) | |||
Line 45: | Line 45: | ||
$tocmain.removeClass('tochidden'); | $tocmain.removeClass('tochidden'); | ||
}); | }); | ||
- | </script></html> | + | </script> |
+ | <script> | ||
+ | $(function(){ | ||
+ | $('img').each(function(){ | ||
+ | var thumb = $(this).attr('src'); | ||
+ | var reg = new RegExp('^(\/wiki\/images)\/thumb'); | ||
+ | if(thumb.match(reg)){ | ||
+ | var image = thumb.replace(reg, '$1'); | ||
+ | image = image.replace(/[^\/]+?$/, '').replace(/\/$/, ''); | ||
+ | var $tag = $('<img>').attr('src', image); | ||
+ | $(this).closest('a').bind('click', function(){ | ||
+ | $('<div>').append($tag).lightbox_me(); | ||
+ | return false; | ||
+ | }); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | </html> |
Latest revision as of 03:24, 6 October 2011