Hi guys,
I'm attempting to hide an animated vector element after 2 seconds with a fade out, but the page just keeps displaying normally (without the delayed hide).
This is the page: https://www.heartglobal.org/home
The line between 7 CONTINENTS ---- 195 COUNTRIES is the element I'm trying to hide after 2 seconds.
The line currently has a standard animation set up: reveal from top, duration .6 seconds, delay .4 seconds. (The problem is with hiding it 1 second after it completes it initial animation.)
The line's ID is #arrowone.
Here is my code: (also shown on attached screenshot)
$w.onReady(function () {
setTimeout(function() {
$w("#arrowone").hide("fadeOut")
}, 200);
}
);
As you can likely tell, I'm very new to code. What might my code be missing here?
As you know ->
1000 milliseconds = 1 second
Therefore, 2000 ms = 2 seconds
So, the code will probably like ->
$w.onReady(function () { setTimeout(function() { $w("#arrowone").hide("fade") }, 2000); });
https://www.w3schools.com/jsref/met_win_settimeout.asp