title: Wait to run Javascript after all partials are loaded on a page
body: <p>The application I'm working on is an internal business application for managers. It's a C# web application. The main office has an instance of this app running and it always has the latest version. Each store has it's own instance of the application running as well, but may not always have the latest version. A manager logs in to the main office app and then selects a store to view. That store's instance is pulled up in the main part of the app, the upper menu bar is from the main office's instance. Thus, it is possible that the main office has v1.8 and a store to have v1.7. </p>
  
  <p>There are some features in 1.8 that show up on the menu bar that are not present in 1.7 that I would like to hide. The main page has multiple partials that get loaded and the very last partial has the specific store's version number that is determined by the code on that store's server. Because of this, the only way to get the version number is to get it after it is rendered on the page. The main problem I'm having is that the Javascript I'm using to hide the links to the new features is running before the partial with the version number loads.</p>
  
  <p>I need the Javascript to wait until the entire page finishes loading to execute the hiding code. Also, the application is only run in Chrome.</p>
  
  <p>Here is the code I've got to hide the links:</p>
  
  <pre><code>$(window).load(function () {
      if ($('.version').length !== 0) {
          if (parseFloat($('.version').text().slice(5)) &gt; 1.7) {
              $('.analysis').show();
          } else {
              $('.analysis').hide();
          }
      }
  });
  </code></pre>