본문으로 건너뛰기
Version: Next

Listen to Events

Conveyer has scroll related events.

You can refer to the documentation and use it according to each framework.

You can listen to Conveyer's events with Conveyer#on

Since events occur during initialization, set autoInit to false if you want to register events.

import Conveyer from "@egjs/conveyer";

const conveyer = new Conveyer(".items", {
autoInit: false,
});

conveyer.on("scrollStart", evt => {
console.log(evt);
});

conveyer.init();

See all available events at Conveyer#events.