Browse Source

Listing 5.12: inserting footnote numbers before moving them.

Frederic G. MARAND 8 years ago
parent
commit
0da8574893
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Chapter 5/05.js

+ 1 - 0
Chapter 5/05.js

@@ -20,6 +20,7 @@ $(document).ready(function () {
   // Create footnotes.
   // Create footnotes.
   var $notes = $('<ol id="notes"></ol>').insertBefore('#footer');
   var $notes = $('<ol id="notes"></ol>').insertBefore('#footer');
   $('span.footnote').each (function (index) {
   $('span.footnote').each (function (index) {
+    $('<sup>' + (index + 1) + '</sup>').insertBefore(this);
     $(this).appendTo($notes).wrap('<li></li>');
     $(this).appendTo($notes).wrap('<li></li>');
   });
   });
 });
 });