For the convenience of my users, I want the mouseover event to fire after the selector has been hung for half a second, and not immediately as soon as it hovers it.
At first I tried the setTimeout function, but it works, although the element was visible, I did not think it was too much, I think. I also spent the day (on and off), looking for (and playing Pacman) ti no result unless I looked for the wrong things.
I would like to keep this plugin, if possible, purely for speed of execution and maintainability.
$("#mySelector").mouseover(function(){
$(this).addClass("hasBeen500ms");
});
Let's see if we can hack it, I know that he will have so many applications!
source
share