Scroll event in carousel



  • Hi,

    I’m using a carousel within an ons-page and the scroll event listener is not working. I’ve tried to implement the same code on an ons-page that is not within a carousel and it does not seem to work. The event listener is added to the “page_content” class as a previous post suggested. How can I get this event listener to work within the carousel?



  • I may be misunderstanding what you mean exactly.

    Here’s an demo showing how the scroll event works for pages both outside and inside a carousel.

    It logs 0 for the outer page and 1 for the inner one. If neither is what you want then a more precise explanation would be appreciated.

    Maybe you could provide an example showing what you are trying to do (a codepen would be preferred though not a requirement). That way we can find out where exactly the problem lies.