Invert Filter for Text Code

Hi, I want to make my title have a color invert effect when it scrolls past images. It is white colored text anchored to the top of the page against black background. I would like to see as your scroll down the page, the title is invert against the images as you scroll. I couldn’t seem to find the correct code however.

You can use HTML property of text elements and enterViewport events

Hi Liza,

First of all, if you wish to change the entire strip once the visitor scrolls I believe this video will help you. you will see how to create a frozen header on your website that changes as visitors scroll.

Second, if you wish to change the strip several time (or the title in your header), I suggest you to add several anchors that mark where the change will be after scrolling over.

Afterword add an event handler that runs when the anchors are viewportLeave.
at the handler of each anchors’s viewportLeave right the code.


export function anchor_viewportLeave(event) {
    $w('#text22').hide()
}

Here you can read more about anchors.
Here you can read about the function viewportLeave().

Have a nice day and best of luck!
Sapir,