Class: Toggler

Toggler(options)

new Toggler(options)

A class for enabling toggling

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
eventBus OO.EventEmitter

Object used to emit section-toggled events.

$container jQuery.Object

to apply toggling to

prefix string

a prefix to use for the id.

page Page

to allow storage of session for future visits

isClosed boolean <optional>
Source:

Methods

reveal(selector, $container, page)

Reveals an element and its parent section as identified by it's id

Parameters:
Name Type Description
selector string

A css selector that identifies a single element

$container Object

jQuery element to search in

page Page
Source:

toggle($heading, page)

Given a heading, toggle it and any of its children

Parameters:
Name Type Description
$heading jQuery.Object

A heading belonging to a section

page Page
Source: