The trick sets a real div, hidden by default, and a βWaitβ div is placed above it. At the end of heavy coding, add a line hiding the Wait div and showing the real one.
Sample code for the required HTML:
<div id="pnlPleaseWait"> Loading please wait... <div> <div id="pnlMain" style="display: none;"> ....heavy stuff going on here... ....heavy stuff going on here... ....heavy stuff going on here... </div>
And jQuery lines at the end of heavy processing:
$("#pnlPleaseWait").hide(); $("#pnlMain").show();
source share