Added a timeout to throttle onscroll event