jQuery Plugin For Checking Content Has Been Loaded is loading - Download jQuery Plugin For Checking Content Has Been Loaded - is loading

Download jQuery Plugin For Checking Content Has Been Loaded – is loading

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin For Checking Content Has Been Loaded – is loading, hope it will help you in programming stack.

jQuery Plugin For Checking Content Has Been Loaded is loading - Download jQuery Plugin For Checking Content Has Been Loaded - is loading
File Size: 107 KB
Views Total: 7690
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

is loading is a simple jQuery plugin that checks if all content (or any action) of your web page has been loaded and then triggers a visual feedback to your visitors. It also can disable form elements and put an overlay an specified area or whole page while the loading is active.

Installation:

1 # Yarn
2 yarn add is-loading
3  
4 # NPM
5 $ npm install is-loading

Basic Usage:

1. Include jQuery library and is loading plugin on the page

1 <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
2 <script src="jquery.isloading.js" type="text/javascript"></script>

2. The Markup

1 <div class="demo">
2 <p class="alert">container</p>
3 <span class="btn">Test Button</span>
4 </div>

3. The javascript

01 <script>
02 $(function() {
03  
04 // Action on Click
05 $( ".btn" ).click(function() {
06  
07 $( this ).isLoading();
08  
09 // Load data or whatever
10 $( "p" ).removeClass("alert-success");
11  
12 // Data Loaded, re-enable event
13 setTimeout( function(){
14  
15 // Deactivate the loading plugin
16 $( ".btn" ).isLoading( "hide" );
17  
18 $( "p" ).html( "Content Loaded" )
19    .addClass("alert-success");
20 }, 1000 );
21 });
22  
23 });
24 </script>

4. Options

01 const optionsDefault = {
02  
03   // switch | replace | full-overlay | overlay
04   'type': 'switch',       
05  
06   // Text to display next to the loader
07   'text': "Loading...",                
08    
09   // true | false
10   'disableSource': true,     
11   'disableList': []
12    
13 };

Change logs:

2017-03-13

  • v2.0.2

2015-02-17

  • v1.0.6

2014-10-05

2014-10-01

  • Allow hide for multiple elements seperately

This awesome jQuery plugin is developed by hekigan. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net