Portal Home > Knowledgebase > Articles Database > jquery mouse wait action
jquery mouse wait action
Posted by Syphic, 08-08-2008, 02:29 AM |
Alright, I am working on see if i could make a action in jquery happen only if the mouse stayed over the action for x period if seconds.
Basically the idea is if the user mouseover's on a button and they keep it there, after 1 or 2 seconds it would open up the submenu and the submenu would only disappear if the mouseout'ed it for more than 2 seconds...
Any thoughts? The reason for this is to make sure the user wants to see the content and wants to leave it. It also makes clickless functions.
Any thoughts?
I tried basically if mouseover then setTimeout(init_menu(),2000) if init_menu(){mouseover then show but that didnt work.
|
Posted by Xeentech, 08-08-2008, 02:59 AM |
What about something like that?
Note, this is completely untested, but gives an overview of how I'd do it.
|
Posted by Syphic, 08-08-2008, 11:35 PM |
Thank for the code but it does not do what I want. This only after mousing over makes the action happen in 1 second. What I am looking for is when a user puts the mouse over a link it will wait 1 second then then if the mouse has not moved; it will fire off the link but only if the mouse has been still.
|
Add to Favourites Print this Article
Also Read