StaticgetRetrieve an existing widget by element and ID.
StaticregisterIf no actions are supplied, nothing is done.
Optionalconfig: CheckTriggerConfigLisnUsageError If the config is invalid.
ReadonlydestroyUndoes all modifications to the element and returns it to its original state.
You will need to recreate it if you want to enable its functionality again.
ReadonlydisableDisables the functionality of the widget. What this means is specific to each widget.
ReadonlyenableRe-enables the functionality of the widget. What this means is specific to each widget.
ReadonlygetReturns the trigger's actions.
ReadonlygetReturns the trigger config.
ReadonlygetReturns the element passed to the widget constructor.
ReadonlyisReturns true if the widget is destroyed.
ReadonlyisReturns true if the widget is currently disabled.
ReadonlyonThe given handler will be called when the widget is destroyed.
ReadonlyonThe given handler will be called when the widget is disabled.
ReadonlyonThe given handler will be called when the widget is enabled.
Readonlyreverse"Undo"es all the Actions linked to the trigger.
Readonlyrun"Do"es all the Actions linked to the trigger.
Readonlytoggle"Toggle"s all the Actions linked to the trigger.
ReadonlytoggleRe-enables the widget if disabled, otherwise disables it.
CheckTrigger allows you to run actions when the user checks a target checkbox input element, and undo those actions when they uncheck the checkbox.
To use with auto-widgets (HTML API), see registerTrigger for the specification.
target: A string element specification. See getReferenceElement.Example
Add classes
activeandcheckedwhen the user checks the checkbox, remove them when unchecked.Example
As above, but using a CSS class instead of data attribute:
Example
Play the animations on the element each time the user checks the next element with class
checkbox(do nothing when it's unchecked).Example
Add class
usedthe first time the user checks the next element with classcheckbox, and play or reverse the animations 200ms after each time the user toggles the reference checkbox.Example
When the user checks the next element with class
checkboxthen add classesc1andc2to the element (that the trigger is defined on) and enable triggermy-triggerdefined on this same element; undo all of that when the user unchecks the reference checkbox.Example
As above, but using
data-lisn-refattribute instead of class selector.