title: JQuery scroll with anchor link to another page offset header
body: <p>I have this anchor link from Page A, abc.com/news#section2</p>
  
  <p>In news page, the header blocks the top part of the section 2. I tried to offset it in jquery but it doesn't work. 
  Hope someone can help, thanks in advance! </p>
  
  <pre><code>jQuery('.ch-item a').click(function(e) {
  
      var link = jQuery(this);
      var target = jQuery(link.attr('href').substring(link.attr('href').indexOf('#')));
      if(target.length &gt; 0) {
          jQuery('html, body').stop().animate({scrollTop: target.offset().top - jQuery('.header_container').outerHeight()}, 1000);
          e.preventDefault();
      } else if(options.preventNonLink) {
          e.preventDefault();
      }
  });``
  </code></pre>