Fade out text box

Hi there,
I know that Wix has a great Fade in function for text, but I would like the text to fade in, then fade out, or if easier, just fade out after about 5 seconds. Can anyone help? Thanks

Seems like the previous replies to this similar request all have the links showing how to do it, removed.

This post, the links do not go anywhere but to an unrelated feature request: https://www.wix.com/corvid/forum/community-discussion/fade-out-text-box

Check the HiddenMixin API

If you want to fade out an element after it completes a fade in you can use something like below.

$w("#myElement").show("fade")
  .then( ( ) => {
    $w("#myElement").hide("fade");
});

If you want to fade out an element after 5 seconds you can do something like below.

setTimeout( () => {
    $w("#myElement").hide("fade")
}, 5000); //5000 milliseconds

If you want to fade out an element 5 seconds after it completes a fade in then see below.

$w("#myElement").show("fade")
.then( ( ) => {
     setTimeout( () => {
         $w("#myElement").hide("fade");
     }, 5000);
});

Place the code under the page’s onReady function to apply it on page load

1 Like

Awesome! It works swimmingly

It only worked in the preview mode. When I published the site, it doesn’t seem to work…