2012-01-04 162 views
0

我相信這可能是用戶在cufon中使用懸停時最常見的問題之一。此外,可能有很多解決方案,但我試圖無濟於事。請幫幫我。 ,我遇到問題的網站是[這裏]cufon懸停鼠標懸停後處於懸停狀態。

jQuery(document).ready(function(){ 
    jQuery('.menubar a').hover(function(){ 
     jQuery('menubar a').css('color','#000000'); 
     Cufon.refresh('menubar a'); 

    },function(){ // this is the mouse out 

     jQuery('menubar a').css('color','#707070'); 
     Cufon.refresh('menubar a'); 
    }); 
}); 

我也曾嘗試刷新使用Cufon.refresh()中的Cufón的幾個嘗試。懸停仍然無法正常工作。有沒有另一種解決方案,或者我錯過了什麼?

回答

2

您正在選擇.menubar a而不是隻有被徘徊的那個。嘗試this(雙關語意)

jQuery(document).ready(function(){ 
    jQuery('.menubar a').hover(function(){ 
     jQuery(this).css('color','#000000'); 
     Cufon.refresh(this); 
    },function(){ // this is the mouse out 
     jQuery(this).css('color','#707070'); 
     Cufon.refresh(this); 
    }); 
}); 

不僅如此,一些你選擇的是menubar a時,他們應該是.menubar a(注意.

+0

Omg,謝謝madmartigan。我沒有注意到我自己的錯誤。 = /非常感謝! – Xavien 2012-01-04 22:43:08