Guest User

Untitled

a guest
Oct 18th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    $('.msg_id').live("mouseenter", function() {
  2.     $(this).css('cursor', 'pointer');
  3.     tid = $(this).attr('id');
  4.     $.post("log_msg.asp", $("#msgForm").serialize() + "&aktion=popup&msg_id="+tid,
  5.     function(data) {
  6.        
  7.       $("#"+tid).html(data);
  8.      
  9.     });
  10.     });
  11.  
  12.    $('.bubbleInfo').live("mouseover mouseout", function(event) {
  13.         var distance = -10;
  14.         var time = 250;
  15.         var hideDelay = 0;
  16.  
  17.         var hideDelayTimer = null;
  18.  
  19.         var beingShown = false;
  20.         var shown = false;
  21.         var trigger = $('.trigger', this);
  22.         var info = $('.popup', this).css('opacity', 0);
  23.                 var popd = $('.popup-div', this);
  24.         if ( event.type == "mouseover" ) {        
  25.             $([trigger.get(0), info.get(0)]).mouseover(function ()
  26.              {  
  27.                 //var poppos = this.position();  
  28.                 var pdpos = popd.position().top;
  29.                 var pdpos2 = popd.offset().top;
  30.                 //var bott =  $(document).height() - poppos.top;
  31.                             var p = $(window).height() - pdpos;
  32.                             var infoh = info.height();
  33.                          
  34.                             popd.css("top", pdpos);
  35.                             if(p < infoh)
  36.                             {
  37.                                 //popd.css("top", pdpos - infoh );
  38.                             }
  39.                              
  40.                 if (hideDelayTimer) clearTimeout(hideDelayTimer);
  41.                 if (beingShown || shown) {
  42.                     // don't trigger the animation again
  43.                     return;
  44.                 } else {
  45.                     // reset position of info box
  46.                     beingShown = true;         
  47.                     info.css({          
  48.                         display: 'block'                       
  49.                     }).animate({                      
  50.                        
  51.                         opacity: 1
  52.                     }, time, 'swing', function() {
  53.                         beingShown = false;
  54.                         shown = true;
  55.                     });
  56.                
  57.                 }
  58.            
  59.                 return false;  
  60.                     });
  61.       }
  62.         if ( event.type == "mouseout" ) {  
  63.         //.mouseout(function () {
  64.             if (hideDelayTimer) clearTimeout(hideDelayTimer);
  65.             hideDelayTimer = setTimeout(function () {
  66.                 hideDelayTimer = null;
  67.                 info.animate({
  68.                     //top: '=' + distance + 'px',
  69.                     opacity: 0
  70.                 }, time, 'swing', function () {
  71.                     shown = false;
  72.                     info.css('display', 'none');
  73.                    
  74.                 });
  75.  
  76.             }, hideDelay);
  77.  
  78.             return false;
  79.           }
  80.         });
  81. });
Add Comment
Please, Sign In to add comment