DescriptionList

DescriptionList

new DescriptionList(element, options)

Source:
Parameters:
NameTypeDescription
elementHTMLElement

DOM element for component instantiation and scope

optionsObject
Properties
NameTypeDescription
moreItemLabelSelectorString

Selector for more button label attribute

listsSelectorString

Selector for list element

visibleItemsSelectorString

Selector to retrieve the number of visible items

attachClickListenerBoolean

Whether or not to bind click events

Classes

DescriptionList

Methods

destroy()

Description:
  • Destroy component.

Source:

handleClickOnMore(e)

Description:
  • Expands the list of items.

Source:
Parameters:
NameTypeDescription
eEvent

init()

Description:
  • Initialise component.

Source:

showHide()

Description:
  • showHide elements basing on user preference.

Source:

(static) autoInit(root) → {DescriptionList}

Source:
Parameters:
NameTypeDescription
rootHTMLElement

DOM element for component instantiation and scope

Returns:

An instance of DescriptionList.

Type
DescriptionList