jQuery Plugin For Built-In Loading Indicator In Buttons - Button Loader

jQuery Plugin For Built-In Loading Indicator In Buttons - Button Loader
File Size: 4.01 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Button Loader is a jQuery plugin for html buttons that trigger a deferred call and display a loading indicator in the button itself. The goal is to bind a spinner element to your button and change the button text when you click on an action button.

See also:

How to use it:

1. Load Font Awesome 4 for animated loading spinners.

<link rel="stylesheet" href="font-awesome.min.css">

2. Load jQuery library and the jQuery Button Loader plugin's files in the page.

<link href="buttonLoader.css" rel="stylesheet">
<script src="jquery-1.11.3.min.js"></script>
<script src="jquery.buttonLoader.js"></script>

3. The JavaScript to start the loading animation in the button.

$('.button-class').click(function () {
  var btn = $(this);
  $(btn).buttonLoader('start');
  setTimeout(function () {
    $(btn).buttonLoader('stop');
  }, 5000);
});

Change log:

2016-08-01


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