- Source:
stagetime - Show or hide DOM elements based on the local time.
Members
(static, constant) version
Semantic Version of the package.
- Source:
Methods
(static) init(elopt, settingsopt) → {Element|Array.<Element>}
This function inspects the data-stagetime-after
and data-stagetime-until
attributes of the given element and then adds or removes the stagetime-on
or stagetime-off
classes appropriately.
This function will also schedule future checks in case the after
or
until
times are in the future.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
el |
Element |
<optional> |
Element to initialize. If missing, all elements with
either a |
||||||||||||||||||||||||||||||
settings |
Object |
<optional> |
Override default settings. Properties
|
Returns:
Returns the elements that were initialized.
- Type
- Element | Array.<Element>