one of these days, i'm going to have to actually write something. this is not that day.

This commit is contained in:
Mark Pilgrim
2009-03-20 00:02:16 -04:00
parent 2ee90d10a6
commit ec31ba38a5
2 changed files with 11 additions and 7 deletions
+6 -2
View File
@@ -15,7 +15,7 @@ $(document).ready(function() {
}
*/
$("#toc").html('<a href="javascript:showTOC()">table of contents</a>');
hideTOC();
// "hide", "open in new window", and (optionally) "download" widgets on code & screen blocks
$("pre > code").each(function(i) {
@@ -83,6 +83,10 @@ function plainTextOnClick(id) {
win.document.close();
}
function hideTOC() {
$("#toc").html('<span>&#8227;</span> <a href="javascript:showTOC()">show table of contents</a>');
}
function showTOC() {
var toc = '';
var old_level = 1;
@@ -100,5 +104,5 @@ function showTOC() {
toc += '</ol>';
level -= 1;
}
$("#toc").html(toc);
$("#toc").html('<span>&#9662;</span> <a href="javascript:hideTOC()">hide table of contents</a>' + toc);
}