JumpstartLab/curriculum — pull request #283 by burtlo (2012-09-25 00:58:21+00:00)
Title: TOC Sidebar

Some of our content tutorials are rather large and size and I thought it would be beneficial to have a Table of Contents.

For a page you define a property to enable the sidebar

```
---
layout: page
title: Object Oriented Javascript
sidebar: true
---
```

* All the H2 elements within the article are parsed and populate the sidebar
* When the user enters the general area of the section the TOC will highlight.

An example of this in action:

![TOC](https://img.skitch.com/20120925-8b9u5jjpibretcmh7uxedby1m.jpg)

### Note

A number of jquery animations could be applied to the collapse/expand, highlight, and movement to really make it look slick. I wanted to get some help on this functionality as it is really hacked in there as far as CSS and JS is concerned.