Using Chrome dev tools, you can see where the error come from:
From site.js, line 184:
(window).on("scroll", function(){
// Distance from section to top
var x = $(".contentsection.story").offset().top;
The selector $(".contentsection.story")
doesn't seem to be valid: there is no contentsection element with the story class in your DOM. So you try to access the top properties of $(".contentsection.story").offset()
, which return undefined and throw a TypeError.
I let you solve the problem, now you know where it comes ;)