j-Loading
- it automatically assigns flags
@showloadingand@hideloading
Configuration:
- NEW:
style {Number}a loading style (default:1)1: basic with animated spin2: a blue line at the top of window
Usage:
SETTER('loading/show', [text])- shows loading (textoptional)SETTER('loading/hide', [sleep])- hides loading (sleepoptional and in milliseconds)
Use it with <ui-component name="loading">. 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.
<style>
body { background-color: #F0F0F0; }
</style>
<ui-component name="loading" class="hidden"></ui-component>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<div>Lorem ipsum</div>
<script>
var is = false;
setInterval(function() {
is = !is;
if (is)
SETTER('loading/show');
else
SETTER('loading/hide', 1000);
}, 3000);
</script>