is there any way to make a timer with mouseover?
for example:
put the mouse on a button for 3 seconds and a code will be executed
if the mouse is removed from the button before 3 seconds
it does not execute any commands
is there any code for this type of mechanism?
var state
$w.onReady(function() {state = 1
$w('#button1').onMouseIn(()=>{
setTimeout(()=>{
if (state===1) {
//.... here your code ....
}
else {console.log("You moved mouse out! Action not possible!")}
},3000)
})
$w('#button1').onMouseOut(()=>{
state = 0
})
})
saving my life again.
thanks !
@petriell0anima
You have just one life ! 

this happends because wix it’s not good, not well programed, and slow.
you need make the element collapse after the user remove the mouse from him.
this issues exist like 1 year.
it’s caused because the animation you add to element on mouse in.
(don’t use the container animation, it’s bad)
to fix, just create a code that make the image spears when user click the menu button
and make the image (collapse) when the the user remove the mouse.
or do like me
quit wix and do everthong from zero
hard code.
state1 its a variable “var” https://pin.it/2xvr6um
@petriell0anima
First of all, i would ask the post-opener for some more informations.
-didn’t he really use any code? (perhaps you are right with your suggestion, perhaps not).
The post-opener first should give enough informations to work with.
My slogan —> The more INPUT = the more OUTPUT.
What does the post-opener want to achieve? A Multi-Menu?
https://www.media-junkie.com/simple-megamenu
@russian-dima yes i want do multi menu
@russian-dima
the cord i just know this
@alvinlim2001
If you want to create an own multi-menu, you should do it from scratch by your own (fully by using code), like “petriell0 Anima” already suggested you.
But there are a lot of different ways how to create a multi menu.
Here some examples…
- https://www.wix.com/velo/forum/tips-tutorials-examples/example-mega-menu
- https://www.wix.com/velo/forum/community-discussion/creating-mega-menus-in-wix
- https://www.media-junkie.com/multi-menu
The last example is my own one, there you can see two different custom developed “multi-menues”.
In the header-section you can see a normal and more static-menu, without any relation to a database and on the bottom left side you will see a second one, which is connected to a database. In this menu all the menu-values are stored in a database and are showed by an repeater + multi-state-box.
So as you can see, it will depend on how you want to structure your menu, how much flexibility you want to give your menu and which elements you want to use to construct/create your own multimenu?
how to do like this feel
now i only do until here any answer help me thank
@alvinlim2001
I still don’t see any code of you, sorry.
And which elements did you use?
@petriell0anima Hi I am also trying to create a Mouse over timer delay for my website sprihi. com, the objective is to avoid flickering of the drop down menu when mouse moves very fast over the menu buttons ( example some wants to put a search and has to move the mouse over the menu button). I am unable to replicate the above code could you please help me