i want to make more clear and attractive function so i can make plugin
if you have any other suggestion then let me know so i can ref it
Hi, yes, this is possible. It's basically a simple slider and then you need in each slide a layer in which the background image is moved. layerJS does not support linking the scrolling of two layers together currently. But you can use the multi-transition feature, where you can trigger two transitions at the same time in two different layers.
the links that trigger the transitions are in the neighbors.x parameters of the slide frames (#f1, #f2, #f3). in each frame there is a background layer which contains 3 frames, one in the middle holding a background image, one slightly shifted to the left and one to the right. When transitioning between them, the background image moves slightly left or right. When you do this together with the transition between f1 and f2 you get your parallax effect.
If you want to have objects to move in like in the example you posted you either use the same listener i used or you make a css transition based on the ".lj-active" class which is set on the currently active frame and will be removed when it gets deactivated