domCollapse allows you to collapse and expand parts of page by activating other parts of a page.

To define a element that expands or collapses others add the class trigger to it as an attribute. This will automatically collapse the next following element in the document tree and add the functionality to alternately collapse and expand it.

The collapsing and expanding is achieved by adding and removing classes from the elements. This means you do not need to know any Javascript to make domCollapse behave differently.

LifeHacker < domCollapse