Class: Collapsible

nyc/Collapsible~ Collapsible


new Collapsible(options)

Class for creating collapsible containers

Parameters:
Name Type Description
options module:nyc/Collapsible~Collapsible.Options

Collapsible options

Source:

Extends

Methods


append(elements)

A method to append elements to the container

Parameters:
Name Type Description
elements jQuery | Element | Array.<Element> | string

The element to append

Inherited From:
Source:
Returns:

The container

Type
jQuery

find(selector)

A method to return elements in the container

Parameters:
Name Type Description
selector string

jQuery selector

Inherited From:
Source:
Returns:

The element

Type
jQuery

getContainer()

A method to return a control container HTML element wrapped in a JQuery

Inherited From:
Source:
Returns:

The the control container HTML element wrapped in a JQuery

Type
jQuery

prepend(elements)

A method to prepend elements to the container

Parameters:
Name Type Description
elements jQuery | Element | Array.<Element> | string

The element to append

Inherited From:
Source:
Returns:

The container

Type
jQuery

toggle()

Toggle the expanded state of the container

Source:

Type Definitions


Options

Constructor options for module:nyc/Collapsible~Collapsible

Type:
  • Object
Properties:
Name Type Argument Default Description
target jQuery | Element | string

The target element for the collapsible container

title jQuery | Element | string

The title for the collapsible container

content jQuery | Element | string

The content for the body of the collapsible container

collapsed boolean <optional>
false

The starting state of the collapsible container

Source: