view source
01
$('.button-class').click(function () {
02
03
var btn = $(this);
04
05
$(btn).buttonLoader('start');
06
07
setTimeout(function () {
08
09
$(btn).buttonLoader('stop');
10
11
}, 5000);
12
13
});
view source
1
<link href="buttonLoader.css" rel="stylesheet">
2
3
<script src="jquery-1.11.3.min.js"></script>
4
5
<script src="jquery.buttonLoader.js"></script>