15 Aug, 2008 in Web-Entwicklung by Jérôme

Automatic Footnotes with MooTools

I have found a script to generate automatic website footnotes (with jQuery) that I liked so much that I did it the MooTools way and added some additional features.

The script pulls quotes from blockquote and q elements, parses the cite and title attribute and automagically generates footnotes that will be added to or after a specified element on your page.

In addition to that you can jump back and forth between the quote and the corresponding footnote.

  1. Embed the class AutomaticFootnotes into the head of your web page.
  2. Load and configure the class:

    • id (optional, defaults to ‘footnotes’): The footnotes list will receive this ID
    • elSource (optional, defaults to document.body): The DOM element the quotes will be pulled from
    • elTarget (optional, defaults to document.body): The DOM element the footnotes will be added to
    • appendMode (optional, defaults to ‘bottom’): ‘top’, ‘bottom’, ‘after’
  3. You’re finished :). Look at the example.

    As always, feedback is highly appreciated.

No Responses so far | Have Your Say!

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>