This script collapses any DIV on the page and lets users manually toggle its appearance via a Smooth "Web 2.0 style" animation. It's a popular effect on many social networking/ comment sites. Three distinguishing features of this script are:
Ability for the script to work on both DIVs that have an explicit CSS height attribute defined, and without.
Ability to "group" multiple collapsible content instances to act as a single unit, so opening one closes the others.
Persistence can be enabled on each collapsible content individually that will remember if the DIV has been expanded, and upon the user's return to the page within the same browser session, keep it expanded.
Individually toggle various attributes of each collapsible content, whether a fade effect should be applied, the duration of the animation, an explicit height, plus whether the content should be hidden via scripting by default when the page loads.
An ontoggle event handler that lets you react whenever a DIV is expanded or collapsed.
Ability to expand the DIVs via a URL parameter String that overrides any default settings/persistence.