Hi there! My client wants hero images on pages to fade in “almost romantically” (3-5 seconds) after page loads. I am wondering if there is an easy way to do this for slideshows and single images. I’ve been attempting to use the Wix developer to code what I need, but every time I try something it is wrong. Any ideas? Thanks!
Hello Gabby,
You do not need code to add a fade in effect with a delay of up to 4 seconds.
Anything longer is not recommended since some users are quick to scroll and might miss the element before it fades into view.
For example, you can create a more fluent user experience by showing the slideshow and image elements as soon as the elements enter the viewport.
$w("#myElement").onViewportEnter( (event, $w) => {
$w('#galleryToFadeIn').show('FadeIn');
});
A similar question was asked previously, see the link below.
Feel free to post your code below if you encounter any issues.
Good luck!
So here is what I added in, and it is saying “parameter event is never used”. I am not an experienced developer at all so this doesn’t make sense to me! I’m also attaching the error message I received. Any ideas for me? Thanks so much for your help so far!
https://donaltman.wixsite.com/academycopy