Pārlūkot izejas kodu

Listing 5.12: inserting footnote numbers before moving them.

Frederic G. MARAND 8 gadi atpakaļ
vecāks
revīzija
0da8574893
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      Chapter 5/05.js

+ 1 - 0
Chapter 5/05.js

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