Minimal AJAX Loading Spinner Plugin with jQuery - pleaseWait

Minimal AJAX Loading Spinner Plugin with jQuery - pleaseWait
File Size: 6.5 KB
Views Total: 10906
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

pleaseWait is a simple yet customizable jQuery plugin which allows you to use any image (Base64 or GIF) as a loading spinner while waiting for AJAX content to be loaded.

How to use it:

1. Add jQuery library and the jQuery pleaseWait plugin to your webpages.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="jquery.pleaseWait.js"></script>

2. Display a loading spinner overlaying the whole page.

$('body').pleaseWait();

3. Display a loading spinner overlaying a specific container.

$('#el').pleaseWait();

4. Hide the loading spinner.

$('#el').pleaseWait('stop');

5. Customize the loading spinner.

$('#test').pleaseWait({

  // crazy mode
  crazy:false,

  // animation speed
  speed:8,

  // rotation speed
  increment: 2,

  // image path
  image:'BASE64 IMAGE HERE',

  // encoded of gif
  imageType: 'encoded',

  // height & width of the loading spinner
  height:65,
  width:65
  
});

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