title: Internal links return null errors and I can't find the mistake in my Javascript. External links work just fine
body: <p>I set up a website and tried a fancy navigation, which I copied from <a href="http://codepen.io/arjancodes/pen/jErbyM" rel="nofollow">http://codepen.io/arjancodes/pen/jErbyM</a> and customized a little bit.
  (Thanks for inspiring me!)</p>
  
  <p>This is my site</p>
  
  <p>davidgoossens.com</p>
  
  <p>The HTML and CSS work fine but internal links (when you open the navigation on the bottom right) keep returning 404s.
  My webhoster told me the mistake must be in the JS which is:</p>
  
  <pre><code> var nav = document.querySelector('.material-menu-wrapper');
   var circle = document.querySelector('.material-btn');
   var link = document.querySelector('.material-content').querySelectorAll('li');
   var ham = document.querySelector('.material-hamburger');
   var main = document.querySelector('.content-fade');
  
  
  
  var win = window;
  
  function openMenu(event) {
    nav.classList.toggle('active');
    circle.classList.toggle('active');
    ham.classList.toggle('material-close');
    main.classList.toggle('active');
    for (var i = 0; i &lt; link.length; i++) {
      link[i].classList.toggle('active');
    }
    event.preventDefault();
    event.stopImmediatePropagation();
  }
  
  function closeMenu() {
    if (circle.classList.contains('active')) {
      circle.classList.remove('active');
      for (var i = 0; i &lt; link.length; i++) {
        link[i].classList.toggle('active');
      }
      ham.classList.remove('material-close');
      main.classList.remove('active');
      nav.classList.remove('active');
    }
  }
  
  
  circle.addEventListener('click', openMenu, false);
  circle.addEventListener('touchstart', openMenu, false);
  win.addEventListener('click', closeMenu, false);
  win.addEventListener('touchstart', closeMenu, false);`    
  </code></pre>
  
  <p>This is the HTML of my navigation</p>
  
  <pre><code>&lt;div class="material-menu-wrapper"&gt;
    &lt;div class="material-menu"&gt;
      &lt;div class="material-btn"&gt;
        &lt;div class="material-hamburger"&gt;
          &lt;div class="material-patty"&gt;&lt;/div&gt;
          &lt;div class="material-patty"&gt;&lt;/div&gt;
          &lt;div class="material-patty"&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="material-content"&gt;
        &lt;nav&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href="http://davidgoossens.com/thesen.html"&gt;Thesenpapier&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="http://davidgoossens.com/motivation.html"&gt;Motivation&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="http://davidgoossens.com/work.html"&gt;Arbeitsproben&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="http://davidgoossens.com/cv.html"&gt;CV&lt;/a&gt;&lt;/li&gt;
  
          &lt;/ul&gt;
        &lt;/nav&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Would be great if you could help me fix this!!!</p>
  
  <p>Best regards</p>
  
  <p>David</p>