using jQuery, I do this.
$(document).ready(function() { $("#contentLoading").hide(); $("#contentLoading").ajaxSend(function(r,s){ $(this).show(); $("#ready").hide(); }); $("#contentLoading").ajaxStop(function(r,s){ $(this).hide(); $("#ready").show(); });
Instead of hiding and showing things, you can start the generator.
source share