Namespace: collapsible

Marked. collapsible

Collapsible sections methods

Source:
collapsible.js

Requires

Methods


collapseAll(dir)

Collapse or expand all sections

Parameters:
Name Type Description
dir boolean

Flag to collapse (true) or expand (false)

Source:
collapsible.js

init()

Initialize collapsible headers. Adds markup to contents between headers.

Source:
collapsible.js
Returns:

success

Type
boolean

restore()

Restore collapsed sections (from Marked.collapsible.store)

Source:
collapsible.js

reveal($el, level)

Reveal section, updating code blocks and bookmarks as needed

Parameters:
Name Type Description
$el object

jQuery element to toggle (header)

level number

Used only in recursion to expand child sections

Source:
collapsible.js

store()

Store collapsed sections in Cocoa object for restore after a window refresh

Source:
collapsible.js

updateTOC()

Update the TOC to reflect collapsed sections.

Source:
collapsible.js