I have a jQuery function func1 that works fine on document ready:
$(document).ready(function ()
{
//func1 description is here
...
$(func1);
}
also I have
$(function ()
{
$("#my-ul a").hover(function ()
{
//do something on my-ul a hover
});
$("#my-ul a").mouseleave(function ()
{
//do something on my-ul a mouseleave
});
});
and it works fine.
What I want as well is to stop func1 on my-ul a hover and start it again on my-ul a mouseleave (like you didn’t hover at all).
Browsing stackoverflow didn’t help me with the answer. I believe .stop() function should be used, but I had no luck to use it properly for my example.
Thank you.
Update:
Here is an jsFiddle example and I want to stop changing text when hovered on link and start changing the same way onmouseleave back.
You could not cancel
delay, you need to usesetTimeoutorserIntervalinstead.The code (THE DEMO):