Loader loader.js

Animation for visual indication of waiting time.

Usage

Via JavaScript

Call the loader control via JavaScript:

{% highlight js %}$('#myLoader').loader();{% endhighlight %}

Via data-attributes

To enable the loader control without writing JavaScript, add data-initialize="loader" to the .loader element that you wish to initialize. Such elements that exist when $.ready() executes will be initialized.

Markup

Place class="loader" on a div.

{% highlight html %}
{% endhighlight %}

Methods

.loader('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.

Examples

Animation for visual indication of waiting time that can be customized to have many appearances.

{% highlight html %}
{% endhighlight %}