Help forum

Scroll down vs. scroll up event

  • ssssadsadasd

    1 year ago

    When I scroll up I want to hide a group, when I scroll down I want to show the group.
    the "scroll" events seem to not do the trick.
    is this possible in toddle?

    thanks
  • Max

    1 year ago

    Hey! You can do anything in toddle that you can do in javascript 😊
    In your case, the scroll event should do the trick. But you need to add some logic. You need to store the scroll position in a variable and compare it with the new position
  • lennartblmn

    1 year ago

    you can use touch and or mouse events. on touch start, save the clientY, and on touch end, compare the startY to endY and if the distance is greater than your threshold you can execute your hide or show group