Guard against index out of bounds.
Add scrollBy option.