Hi,
i intend to let a textbox fade in and let it fade out after a few seconds. For fading it in, i use the predefined animation in Wix and set the duration to 2750ms, this works fine. However, when i now try to fade out this textbox using the hide() function in velo code, it disappears instantaneously although i set the duration to 2750ms again. The delay is working, but not the duration even if i try out several other values. Any ideas what is happening here? I use the following code:
const Text = $w(“#text23”);
let fadeOptions = {
“duration”: 4000,
“delay”: 4000
};
Text.hide(“fade”,fadeOptions);
looks like it should be ok.
always best to quote code in the correct way
this is your code pasted in
const Text = $w(“#text23”);
let fadeOptions = {
“duration”: 4000,
“delay”: 4000
};
Text.hide(“fade”,fadeOptions);
This is the correct code
const Text = $w("#text23");
let fadeOptions = {
"duration": 4000,
"delay": 4000
};
Text.hide("fade", fadeOptions);
if that doesnt work it may have something to do with the predefined animation. You may need to code both animations.
const Text = $w("#text23");
let fadeInOptions = {
"duration": 2750
};
Text.show("fade", fadeInOptions);
Thanks for the reply. I tried it with a different textbox now, i place it on my webpage (it is visible). Then i just want to hide it using the fade animation. The code works in the sense that the textbox is hidden after executing the code, but it vanishes again instantaneously and not with the fade animation.