Fix for Fix for Fix for Table of Contents for nodes

  1. $('<div id="node-toc" class="toc"><ul></ul></div>').prependTo('div.node div.content');
  2. $('<p class="title">Table of Contents</p>').prependTo("#node-toc");
  3. $('<a name="top" />').prependTo('#node-toc');
  4. $(".field > .field-label").each(function() { $( '<li><a href="' + this.innerHTML + '">' + this.innerHTML + '</a></li>').appendTo("#node-toc > ul")});
  5. $(".field > .field-label").each(function() { $( '<a name="' + this.innerHTML + '"></a>').appendTo(this)});
  6. $('<a href="#top" target="_self">top<a>').prependTo('.field');

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.