added scroll function to nav, js