Jump to content

Jquery! How to disable function hover only on a few seconds?

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Stasonix

Stasonix

    Learning Programmer

  • Members
  • PipPipPip
  • 82 posts
  • Programming Language:C++, PHP, JavaScript, Delphi/Object Pascal, Pascal
  • Learning:C++, PHP, JavaScript, Delphi/Object Pascal
$(this).hover(f1,f2);

than I did $(this).unbind('mouseenter mouseleave');

time delay 5 sec

then I need to cansel unbind and hover must work again, what can I do?

#2
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
I'm not too sure to understand what you are trying to do.
But you could use a boolean in your hover that you put at true, than start a timer for 5seconds that will restore the boolean to false
And on mouseenter & mouseleave you simply test the boolean before executing your script.

Hope this help




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users