For my first real attempt at writing JS I've decided to generate a nav based on html h(1,2,3) elements. The code that isn't mine is from various stackoverflow questions but I think that there's only two functions that aren't mine. If you know any JS (jquery) and would like to propose suggestions that would be cool.
http://codepen.io/CKH4/pen/WQeJWw
http://codepen.io/CKH4/pen/WQeJWw