I am trying to create a stupid loading div. I just want it to show everytime a button is clicked. I have a gif named ajaz-loader.gif located in img/
I have this and it doesn’t work… I just found it on the internet. Any ideas?
<script>
$('#loadingDiv').ajaxStart(function() {
$(this).show();
}).ajaxComplete(function() {
$(this).hide();
});
</script>
Make sure to wrap your code inside a
Then if it still doesn’t work, double check if your #loadingDiv
That looks like this 🙂
Display loading while webservice is running