A function that animates an element’s scrollTop value.