title: Smooth scroll to the div when the page opens with hashtag
body: <p>I have this JS which works but then it starts to scroll before the page completes loading. Is there a way to check page loading and then load for that smooth effect?</p>
  
  <pre><code>jQuery(document).ready(function(){
      var href = window.location.href+'#team';
      var splitit = (href.split('#'))[1];
      if(splitit !== "" || splitit !== "undefined"){
          jQuery('html, body').animate({
              scrollTop: jQuery('#'+splitit).offset().top - 50
          }, 2000);
      }
  });
  </code></pre>
  
  <p>Also, what does <code>splitit</code> do? Can we remove it?</p>