top of page
Forum Posts
Alex Cazacov
Dec 26, 2020
In Coding with Velo
Hi,
I've recently started a website and I would like to make some text dissapear after 5 seconds after the site loads, and then some new text that was hidden, should appear on the site, anyone have an idea of how I can do that?
This was my attempt that didn't work.
// API Reference: https://www.wix.com/corvid/reference
// “Hello, World!” Example: https://www.wix.com/corvid/hello-world
$w.onReady(function () {
setInterval(function(){ $w("#text55").hide("fade", ) }, 0);
setInterval(function(){ $w("#text23").hide("fade", ) }, 5000);
setTimeout(function(){ $w("#text55").show("fade", ) }, 6000);
});
The second (setInterval(function(){ $w("#text23").hide("fade", ) }, 5000);) line of code in the first function works as expected text dissapears after 5s, but then the text that is supposed to apear at second 6 appears only for 1second and then dissapears, while I was expecting it to stay on the page for a specific time, which I do not how to set to be honest, someone pls help.
Thanks,
Alex
0
7
869
Alex Cazacov
More actions
bottom of page