Skip to content

Runtime configuration

Sergey Kamardin edited this page Jun 28, 2013 · 2 revisions

Progress

Once you have initialized loader on some element, u can notify loader about changes in loading state. For example, you have reached 76% of a process, and want to notify about:

$('.my-element').loading({progress: 76});

Thats it! Now, if you are using effects, that reacts with progress state, your animation will be change (look, for example, simple-progress.js effect).

Speed up/down the animation

It is also possible to change speed of animation, depends on something, like progress:

$('.my-element').loading({interval: 50});

Then, if u configured your loader, for example, with interval 100, now your animation will twice faster.

Kewl! =)

Destruct (stop) loader

To stop loader just set progress state >= 100:

$('.my-element').loading({progress: 100});

Clone this wiki locally