Create half-transparent div with gif loader on it. Show and hide it when you need.
<div id="divLoader" style="text-align: center;position: fixed;width: 100%;background: black;left: 0px;top: 0px;height: 100%;opacity: 0.5;"><img src="loader.gif" />
Hide it
$('#divLoader').hide();
Show it
$('#divLoader').show();
Gif loader generator