hieblmedia / is-loading

Simple jQuery plugin to show visual feedback when loading data or any action that would take time

Home Page:http://hekigan.github.io/is-loading/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is-loading

Simple jQuery plugin to show visual feedback when loading data or any action that would take time

Full documentation and examples here

Quick start

Basic use:

$( "selector" ).isLoading();

Stop:

$( "selector" ).isLoading( "hide" );

Add a text in the loader and change the location

$( "selector" ).isLoading({ text: "Loading", position: "inside" });

Add a text in the loader and disable some extra elements

$( "selector" ).isLoading({
    text:       "Loading", 
    disableOthers: [
        $( "#load-in-div .btn" )
    ]
});

Use overlay:

$.isLoading({ text: "Loading" });

Use overlay on element:

$( "selector" ).isLoading({
    text:       "Loading",
    position:   "overlay"
});

Default options:

defaults = {
    'position': "right",        // right | inside | overlay
    'text': "",                 // Text to display next to the loader
    'class': "icon-refresh",    // loader CSS class
    'tpl': '<span class="isloading-wrapper %wrapper%">%text%<i class="%class% icon-spin"></i></span>',
    'disableSource': true,      // true | false
    'disableOthers': []
};

About

Simple jQuery plugin to show visual feedback when loading data or any action that would take time

http://hekigan.github.io/is-loading/

License:MIT License