Scroll down vs. scroll up event

  • ssssadsadasd-1343937514842624000

    ssssadsadasd

    3 months 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.kayr-1344234582345519199

    Max

    3 months 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-1347165366702313472

    lennartblmn

    2 months 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