Team:Freiburg Bioware/jquery
From 2010.igem.org
(Difference between revisions)
Line 13: | Line 13: | ||
}); | }); | ||
</script> | </script> | ||
- | + | /* footnotes */ | |
<script type="text/javascript"> | <script type="text/javascript"> | ||
$(document).ready(function() { | $(document).ready(function() { | ||
- | $(".pageContent").append("< | + | $(".pageContent").append("<ul id=\"footnotes\"></ul>"); |
footnote = 1; | footnote = 1; | ||
- | $("span[title],blockquote[cite],blockquote[title]").addClass("footnote") | + | $("span[title],blockquote[cite],blockquote[title]").addClass("footnote") |
$(".footnote").each(function() { | $(".footnote").each(function() { | ||
+ | $(this).wrap(function() { | ||
+ | return '<a href="#footnote' + footnote + '" />'; | ||
+ | }); | ||
+ | newid = "#' + footnote + '"; | ||
+ | &(this).attr('id', newid); | ||
$(this).append("<sup>"+footnote+"</sup>"); | $(this).append("<sup>"+footnote+"</sup>"); | ||
- | cite="< | + | cite="<a href="' + newid + '>' + footnote ' .</a> <li>"; |
- | + | ||
title=$(this).attr("title"); | title=$(this).attr("title"); | ||
cite+=title; | cite+=title; |
Revision as of 21:30, 11 October 2010
/* footnotes */