Team:Freiburg Bioware/jquery

From 2010.igem.org

(Difference between revisions)
Line 18: Line 18:
$(".pageContent").append("<ol id=\"footnotes\"></ol>");
$(".pageContent").append("<ol id=\"footnotes\"></ol>");
footnote = 1;
footnote = 1;
-
$("q[title],blockquote[cite],blockquote[title]").addClass("footnote");
+
$("span[title],blockquote[cite],blockquote[title]").addClass("footnote");
$(".footnote").each(function() {
$(".footnote").each(function() {
$(this).append("<sup>"+footnote+"</sup>");
$(this).append("<sup>"+footnote+"</sup>");
Line 24: Line 24:
url=$(this).attr("cite");
url=$(this).attr("cite");
title=$(this).attr("title");
title=$(this).attr("title");
-
if(title && url) {
+
cite+=title;
-
cite+="<a href=\""+url+"\">"+title+"</a>";
+
-
} else if(title) {
+
-
cite+=title;
+
-
} else if(url) {
+
-
cite+="<a href=\""+url+"\">"+url+"</a>";
+
-
}
+
cite+="</li>";
cite+="</li>";
$("#footnotes").append(cite);
$("#footnotes").append(cite);

Revision as of 21:05, 11 October 2010