StaticgetRetrieve an existing widget by element and ID.
StaticregisterOptionalconfig: AutoHideConfigReadonlydestroyUndoes 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 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.
ReadonlytoggleRe-enables the widget if disabled, otherwise disables it.
Configures the given element as an AutoHide widget.
The AutoHide widget automatically hides (and optionally removes) the given element, or children of it that match a given selector, after a certain delay.
It executes these actions every time the matching element(s) have a change of attribute or appear (are inserted) into the DOM.
To use with auto-widgets (HTML API) (see settings.autoWidgets), the following CSS classes or data attributes are recognized:
lisn-auto-hideclass ordata-lisn-auto-hideattributelisn-auto-removeclass ordata-lisn-auto-removeattribute (enables AutoHideConfig.remove)NOTE: This widget supports multiple instances per element, you can specify multiple widget configurations, separated with ";".
See below examples for what values you can use set for the data attributes in order to modify the configuration of the automatically created widget.
Example
This will automatically hide (with class
lisn-hide) the element 3 seconds (default delay) after it is inserted into the DOM or after it gets any attributes changed on it (for example that might show it again).Example
This will automatically hide and then remove the element 3 seconds (default delay) after it is inserted into the DOM.
Example
This will automatically
pelements with classmessage2 seconds after they are inserted or changedpelements with classwarning5 seconds after they are inserted or changed; and it will save that particular AutoHide widget with IDmyIDso that it can be looked up using AutoHide.getpelements with classdisposable3 seconds (default delay) after they are inserted or changed