Using Hype Action Events for scroll animations

Cool extension! And it is possible to change pictures in the scroll block depending on their location on the layout. Such a parallax effect is available on desktop sites, but this effect does not work on mobile devices. Your extension allows this to be done on mobile devices. (323.6 KB)

Not really, the scroll event is nothing new in JavaScript. This can be done without the extension.

This extension is about exposing event sources to Hype and allowing to register "actions" mapping JavaScript and Hype functions to handle them by just declaring a data attribute. You can and could do all this by just registering an event handler and writing some code anyway. This demo/example is just one use case and surly with some script one can do more.

The two main goals of this extension are:

  • Actions: easily allowing to run some code without creating a Hype function
  • Events: exposing plenty of events to Hype functions without needing to worry about registering and garbage collecting these handlers

Thanks for the answer. But I solved this problem by correctly positioning the scroll boxes on the layout using only your function in your last example. Here is my example: (552.2 KB)

1 Like