new javascript to solve the serach scroll issue in office hours