Browse Source

Listing 5.16: more join() to build footnote backlinks.

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

+ 5 - 0
Chapter 5/05.js

@@ -32,6 +32,11 @@ $(document).ready(function () {
         '</sup></a>'
         '</sup></a>'
       ].join(''))
       ].join(''))
       .appendTo($notes)
       .appendTo($notes)
+      .append([
+        '&nbsp;(<a href="#context-',
+        index + 1,
+        '">context</a>)'
+      ].join(''))
       .wrap('<li id="footnote-' + (index + 1) + '"></li>');
       .wrap('<li id="footnote-' + (index + 1) + '"></li>');
   });
   });
 });
 });