title: Cannot read property 'top' of undefined in jQuery
body: <p>I just developed a website with scrolling effect using jQuery. When I'm clicking on the menu item, it should scroll down and display the section. When I click on the particular menu, it scrolls down. But in the url, I'm getting <code>www.example.com/#menuitem_name</code>. The particular section is not active. </p>
  
  <p>This is my jQuery file:</p>
  
  <pre><code>$('body').scrollspy({
      target: '.navbar-fixed-top',
      offset: 80
  })
  
  $('a.page-scroll').bind('click', function(event) {
      var link = $(this);
      $('html, body').stop().animate({
          scrollTop: $(link.attr('href')).offset().top - 70
      }, 500);
      event.preventDefault();
  });
  
  });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;section id="beta1.0" class="container"&gt;Hi&lt;/section&gt;
  &lt;li&gt;&lt;a class="page-scroll" href="#beta1.0"&gt;Beta1.0&lt;/a&gt; hi&lt;/li&gt;
  </code></pre>