Hey guys,
again I am trying to achieve something special. I want to have an object on my page that fades out when reaching the header via scrolling. The header itself is transparent for showing the background image. But all content would just go through the header and be visible as well when scrolling. That would mess up the whole beautiful design of course... So, is there a way to make objects disappear when reaching the header section?
Thnx
here is the code I used to make it happen
export function columnStrip5_viewportEnter(event) {
let fadeOptions = {
"duration": 300,
"delay": 1000,
};
$w('#image1').hide("fade", fadeOptions)
}
export function columnStrip3_viewportEnter(event) {
let fadeOptions = {
"duration": 300,
"delay": 1000,
};
$w('#image1').show("fade", fadeOptions)
}
I know that might be clunky but it disappears and reappears where I want it to.
Anyone have any idea how to implement this with Wix Code?
Can someone pick this thread back up? I'm trying to apply this code to my page. Thanks.
I Have the same question, how would i enter that code?
Hi Jaeger,
You can accomplish that easily with the events onViewportEnter( ) and onViewportLeave( ) and by using the Function hide( )
Best,
-Luigi