install
install using npm ,yarn,pnpm etc
npm install infinite-auto-scroller
how to use
invoke the function to an jquery element:
$("#auto-scroll-container").autoScroll();
you can pass an option object if you want:
$("#auto-scroll-container").autoScroll({
scroll_dir:'right',
gear:4,
flex_flow: 'row',
stop: false
});
available options:
name | type | possibel values | default |
---|---|---|---|
flex_flow | string | column,row | row |
gear | integer | integer between 0-7 indicates the speed of the scroller | 4 |
scroll_dir | string | 'left' or 'right' for flex_flow=='row' and 'up' or 'down' for flex_flow=='column' | 'right' or 'down' based on the flex_flow |
stop | boolean | whether stop at the end of scrolling or not | false |