title: Passing page loading time in progress bar
body: <p>I am having progress bar in my page. It should get display until page loads fully. So I want my progress bar display on page equal to page load time. So I tried to get page load time and pass that time value to display progress bar. I have done coding </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var startTime = new Date().getTime();
      var loadTime;
      function pageload() {
          var endTime = new Date().getTime();
          loadTime = endTime - startTime;
          // alert(loadTime);
      }
      window.onload = function () { pageload(); }
      jQuery(document).ready(function () {
  
          jQuery('#container').showLoading(
               {
                   'afterShow':
                  function () {
                      var a = loadTime;
  
                      setTimeout("jQuery('#container').hideLoading()", a);
  
                  }
               });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>after This change It works !</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var startTime = new Date().getTime();
      var loadTime;
      function pageload() {
          var endTime = new Date().getTime();
          loadTime = endTime - startTime;
          setTimeout("jQuery('#container').hideLoading()", loadTime);
          // alert(loadTime);
      }
      window.onload = function () { pageload(); }
      jQuery(document).ready(function () {
  
          jQuery('#container').showLoading();
      });
  &lt;/script&gt;
  </code></pre>