-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi! It would be nice to have ability to specify function called after scrolling is finished. Below are two examples how it could be tackled.
import { scrollTo } from 'scrollyo'
const el = document.querySelector('...')
// callback only for end event
scrollTo(el, 500, () => {
console.log('scrolling is finished!')
})
// or open ability to specify multiple options
scrollTo(el, 500, {
started() {
console.log('scrolling has started!')
},
ended() {
console.log('scrolling is finished!')
},
easing: 'ease-in', // it could even be open for various types of easing
})Metadata
Metadata
Assignees
Labels
No labels