Template:Team:Waterloo/JS/CiteTag

From 2014.igem.org

(Difference between revisions)
 
(12 intermediate revisions not shown)
Line 3: Line 3:
<script type="text/javascript">
<script type="text/javascript">
-
$.each(
+
$( "cite" ).each(
-
  $( "cite" ),
+
   function( index) {
-
   function( citeTag ) {
+
     var name = "#Citation_" + $(this).attr("ref");
-
     citeTag.val( "<a>[" + $( "#Citation_" + citeTag.attr("ref") ).attr("index") + "]</a" );
+
    $(this).html( "<a href=\"" + name + "\">" + $(name).text() + "</a>" );
   }
   }
);
);
 +
 +
$( ":target" ).css( "background-color", "palegoldenrod" );
</script>
</script>
</body>
</body>
</html>
</html>

Latest revision as of 01:59, 9 October 2014