@spa-tools/utilities
scrollToBottom()
The scrollToBottom()
function immediately scrolls to the bottom of a given element.
Usage
import { scrollToBottom } from '@spa-tools/utilities';
// select the element
const myElement = document.querySelector('#myElement');
// do it!
scrollToBottom(myElement);
Arguments
Name | Type | Description |
---|---|---|
el | HTMLElement | The element to scroll bottom to |
Returns
void