Question:
Why isn’t the show() function with an effect working in an onMouseIn/onMouseOut event?
Product:
Wix Editor with Velo
What are you trying to achieve:
I want to create an animation where a social bar appears when hovering over an element (either an image or a box). It works perfectly when using show() without any effect, but when trying to apply an effect like “fade” or “slide,” nothing happens.
What have you already tried:
I tested whether the hidden property changes with show(), and its value becomes false. However, when using show("fade"), the hidden value remains true (as initially set in the Wix Editor).
I also tried using an onClick event assigned to a button, and the result was the same: using show() without effects changes the hidden value to false, but using an effect does not.
Interestingly, if I call show("fade") in onReady, the animation works as expected.
Additional information:
- I verified that the issue is specific to events like
onMouseInandonMouseOut. - The
onReadyevent successfully triggers the animation usingshow("fade"). - The
hiddenproperty behavior suggests that the effect is not being executed correctly in certain event contexts.
// Trying with a button
$w('#button1').onClick(() => {
$w('#sb1').show("fade");
let isHidden = $w("#sb1").hidden;
console.log(isHidden);
});
// Trying with onMouse event
$w('#image1').onMouseIn(() => {
$w('#sb1').show("fade");
});