move auto scroll js code to js asset