Namespace: expand

sh.libs.expand

Generic components for toggling expand. Targets elements with data-expand attribute, and adds a click listener that toggles the class active. If no element with the class toggle is found inside the target element, the entire target element recives the click listener.

Source:

Methods

(static) close(id)

Remove the 'active' class from target element

Parameters:
Name Type Description
id external:jQuery | string Selector or jQuery element
Source:

(static) init()

Initialize the component

Source:

(static) open(id)

Add the 'active' class to target element

Parameters:
Name Type Description
id external:jQuery | string Selector or jQuery element
Source:

(static) toggle(id)

Toggle the 'active' class on target element

Parameters:
Name Type Description
id external:jQuery | string Selector or jQuery element
Source: