title: Show loading spinner/overlay BEFORE page elements appear
body: <p>I would like to show a loading spinner before any of the page elements load, and then load the page elements while the loading overlay is still on. Is this possible? I am using this code but the page still loads elements before the spinner shows up.</p>
  
  <pre><code>$(document).ready(function () {
              setTimeout(function () {
                  $.loader.close();
  
                  // Do something after 5 seconds
              }, 3000);
          });
  </code></pre>