navHeight issue due to window resize

the navHeight variable is incorrect when the window is resized because
the variable isn’t updated.