Updated javascript to scroll