title: SharePoint jquery javascript does not run but works from console
body: <p>I have the following code which works from console but does not work on page load. 
  The page does not have any error.</p>
  
  <pre><code>&lt;div class="nav-report-category"&gt;
  &lt;/div&gt;
  
  &lt;script src="https://code.jquery.com/jquery-3.0.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
      $(".ms-listviewtable tr[class='ms-gb']").each(function(){
          alert('test 3');
      });
      var $mydiv = document.getElementsByClassName("nav-report-category")[0];
      var $liTag = document.createElement('li');
      var $aTag = document.createElement('a');
  
  
  }); 
  &lt;/script&gt;
  </code></pre>