Calling the smoothScroll-function without setTimeout works perfectly. As soon as i use setTimeout the console shows \'Uncaught TypeError: Cannot read proper