jquery.buttonloadingindicator
Version:
A small jQuery Plugin to indicate a loading state of a button
28 lines (19 loc) • 486 B
Markdown
and reverts it when done
1. Download the script
1. Import the script via
```html
<script src="dist/jquery.buttonloadingindicator.js"></script>
```
1. Use it
Start loading
```js
$("a").on("click", function(ev) {
ev.preventDefault();
$(this).startLoading();
// Do work
$(this).stopLoading();
});
```
A simple script that changes the button icon to the fontawesome Spinner