Update scrollingToNearest.js