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.
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:
5 |
$ npm install is-loading |
Basic Usage:
1. Include jQuery library and is loading plugin on the page
2 |
< script src = "jquery.isloading.js" type = "text/javascript" ></ script > |
2. The Markup
2 |
< p class = "alert" >container</ p > |
3 |
< span class = "btn" >Test Button</ span > |
3. The javascript
05 |
$( ".btn" ).click( function () { |
07 |
$( this ).isLoading(); |
10 |
$( "p" ).removeClass( "alert-success" ); |
13 |
setTimeout( function (){ |
16 |
$( ".btn" ).isLoading( "hide" ); |
18 |
$( "p" ).html( "Content Loaded" ) |
19 |
.addClass( "alert-success" ); |
4. Options
01 |
const optionsDefault = { |
10 |
'disableSource' : true , |
Change logs:
2017-03-13
2015-02-17
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.