adding JS scroll detection script