1

Adding ajax spinners

This commit is contained in:
Alex Yatskov 2014-07-28 18:18:54 +09:00
parent 195a6a4043
commit 67b406c3a6
3 changed files with 13 additions and 1 deletions

View File

@ -80,6 +80,15 @@ $(document).ready(function() {
$('#keyword').append($('<option></option>', properties));
}
$(document).on({
ajaxStart: function() {
$('#spinner').show();
},
ajaxStop: function() {
$('#spinner').hide();
}
});
$('#search').prop('disabled', false);
$('#search').click(onSearch);
});

BIN
client/images/spinner.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -9,7 +9,10 @@
<body>
<div class="container">
<div class="page-header">
<h1>Reactive Search</h1>
<h1>
Reactive Search
<img src="images/spinner.gif" id="spinner" style="float: right; display: none;">
</h1>
</div>
<div id="input">