j-OneTime
This component executes a method only once and it waits for expiration.
- Download templates: https://github.com/totaljs/templates
Configuration:
- required
exec {String}a path to the method that will be executed expire {String}expiration, default1 yeardelay {Number}a delay for executing method in milliseconds, default:1000ms
Use it with <ui-component name="onetime">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<ui-component name="onetime" config="exec:onetimealert;expire:1 month"></ui-component>
<script>
function onetimealert() {
alert('After a month, this message will appear again.');
}
</script>