add optional callback function

This function is called when the animated scrolling finishes.