Reverting back javaScript scrolling functionality