title: TypeError: $(...).offset(...) is undefined
body: <p>I'm getting this error</p>
  
  <blockquote>
    <p>TypeError: $(...).offset(...) is undefined</p>
  </blockquote>
  
  <p>with the arrow pointing to the $.</p>
  
  <p>I've looked at the questions that popped up when I typed this error into the title, but I didn't get a solution.</p>
  
  <p>Here is my jquery</p>
  
  <pre><code>$(document).ready(function () {
  if(window.location.href.indexOf("#") &gt; -1)
  {
      var pieces = window.location.href.split(/[\s_]+/);
      var section = pieces[pieces.length-1];
      var element_to_scroll_to = $('#' + section);
      var navbar_height = parseInt($('.navbar').css('height').replace('px', ''));
      animate_scroll(element_to_scroll_to, navbar_height, 25);
  }
  });
  
  function animate_scroll (element, variable, offset) {
      $('html, body').stop().animate({
          scrollTop: $(element).offset().top - variable - offset
  
      }, 600);
  
  }
  </code></pre>
  
  <p>and this is the order my js files are</p>
  
  <pre><code>{{ HTML::script('js/jquery-1.10.2.js') }}
  {{ HTML::script('js/jquery-ui.js') }}
  {{ HTML::script('js/bootstrap.min.js') }}
  {{ HTML::script('js/wow.min.js') }}
  {{ HTML::script('js/jquery.superslides.min.js') }}
  {{ HTML::script('js/slick.min.js') }}
  {{ HTML::script('js/modernizr.custom.js') }}
  {{ HTML::script('js/classie.js') }}
  {{ HTML::script('js/elastic_grid.min.js') }}
  {{ HTML::script('js/webkrunch_portfolio.js') }}
  {{ HTML::script('js/main.js') }}
  </code></pre>