2011-01-19 20 views

回答

2

它在Firefox中正常工作,但在Chrome中無法正常工作。 我檢查jQuery代碼和我可以使它與兩個更改工作:

1)動畫的頂部
2底部的CSS屬性INSEAD)除去「像素」在表達式的分配給底部/頂部到底導航。 更改的腳本是:

$(function() { 
     $('.bubbleInfo').each(function() { 
      var distance = 10; 
      var time = 250; 
      var hideDelay = 500; 
      var hideDelayTimer = null; 
      var beingShown = false; 
      var shown = false; 
      var trigger = $('.trigger', this); 
      var info = $('.popup', this).css('opacity', 0); 
      $([trigger.get(0), info.get(0)]).mouseover(function() { 
       if (hideDelayTimer) clearTimeout(hideDelayTimer); 
       if (beingShown || shown) { 
        // don't trigger the animation again 
        return; 
       } else { 
        // reset position of info box 
        beingShown = true; 
        info.css({ 
         display: 'block' 
        }).animate({ 
         bottom: '-=' + distance, 
         opacity: 1 
        }, time, 'swing', function() { 
         beingShown = false; 
         shown = true; 
        }); 
       } 
       return false; 
      }).mouseout(function() { 
       if (hideDelayTimer) clearTimeout(hideDelayTimer); 
       hideDelayTimer = setTimeout(function() { 
        hideDelayTimer = null; 
        info.animate({ 
         bottom: '-=' + distance, 
         opacity: 0 
        }, time, 'swing', function() { 
         shown = false; 
         info.css('display', 'none'); 
        }); 
       }, hideDelay); 
       return false; 
      }); 
     }); 
    }); 

P.S:我驗證了這一點,它在Chrome和FF現在的作品。

0

不知道這是否是相關的,但我得到這個錯誤Chrome開發者工具:

Uncaught ReferenceError: _popupControl is not defined http://roseannebarr.tumblr.com/:730 

相關線上:

<script type="text/javascript">_popupControl();</script> 

(被調用函數,確實是不確定的)

+0

Nopes That's just Tumblr :(他們把它放在他們所有的頁面默認情況下。 – 2011-01-19 01:19:29

+0

啊,對不起,我不能使用更多 – 2011-01-19 01:29:46