Guest User

Untitled

a guest
Jul 12th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.56 KB | None | 0 0
  1. var timeoutHandle;
  2.  
  3. $(document).ready(function() {
  4.  
  5.     BindMouseHover($(".helptext"));
  6.  
  7. });
  8.  
  9. function BindMouseHover(elements) {            
  10.     $(elements).hover(
  11.         function() {
  12.             timeoutHandle = setTimeout('HandleMouseHover(true)', 1000);
  13.         },
  14.         function() {
  15.             HandleMouseHover(false);
  16.         }
  17.     );
  18. }
  19.  
  20. function HandleMouseHover(bDelay) {
  21.     if (bDelay) {                
  22.         $(".tooltip").show();
  23.     }
  24.     else {
  25.         $(".tooltip").hide().delay(1000);
  26.         clearTimeout(timeoutHandle);
  27.     }
  28. }
Add Comment
Please, Sign In to add comment