Template:Team:HokkaidoU Japan/HumanPractice/script
From 2011.igem.org
(Difference between revisions)
Line 3: | Line 3: | ||
</script> | </script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | $(function(){ | + | $(function(){ |
- | + | $('span.footnote > a').bind('click', function(){ | |
- | + | var url = $(this).attr('href'); | |
- | + | var title = $(this).text(); | |
- | + | $('<div>').load(url + ' div#bodyContent', function(data){ | |
- | + | var $box = $('<div>').addClass('footnote-box').append($('<h2>').append(title)); | |
- | + | var $footnote = $(data).find('div#contentSub').nextAll('p'); | |
- | + | $box.append($('<div>').append($footnote).addClass('footnote-content')); | |
- | + | $('body').append($box); | |
- | + | $box.append($('<span>').addClass('close').addClass('close-btn-32')).lightbox_me({ | |
- | + | destroyOnClose : true, | |
- | + | modalCSS : { 'top' : '100px' } | |
- | + | }); | |
- | + | ||
- | + | ||
- | + | ||
}); | }); | ||
+ | return false; | ||
}); | }); | ||
}); | }); |
Revision as of 16:57, 5 October 2011