ForgeComponents
en

Components

j-Remember

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

The component calls a function within the repeat interval. Information about the previous call is stored in localStorage.

Configuration:

  • id {String} a remember identifier
  • repeat {String} a repeat time e.g. session or 5 minutes or 1 day
  • exec {String} a link to the function that will be called
  • delay {Number} a caller delay in ms (default: 3000)

Methods:

  • SETTER('remember/clear', 'id')

Use it with <ui-component name="remember">. 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.

example.html
<ui-component name="remember" config="exec:message;repeat:5 minutes"></ui-component>

<script>

	function message() {
		alert('This message will be displayed every 5 minutes');
	}

</script>