2011-04-05 94 views
4

我遇到與IE瀏覽器相關的錯誤(包括& 8)cufon-yui.js 「該屬性或方法不受對象支持」第7行,字符7725,cufon -yui.js.Cufon和Internet Explorer錯誤

這是cufon(IE 9支持的版本)的最後一個版本,我將它用於沒有問題的其他站點。

在這個項目中,我自己也編寫了一些jquery,包括cufon函數,但我不認爲這是它的原因。 IE錯誤是指cufon核心本身。

現在,我無法將您的網站鏈接到隱私問題。

感謝

回答

1

我也遇到的Cufón錯誤在第7行,這種情況發生的時候我做的Cufón-yui.js文件之前Cufon.replace()的調用已完成下載。

0

您可能需要Sizzle Selector實用的IE瀏覽器,它的工作原理手在手的Cufón,因爲所有的替代都是非基本的字符串(如H2li)。

所以在這個順序:

<head> 
    <script type="text/javascript" src="js/sizzle/sizzle.js"></script> 
    <script type="text/javascript" src="js/cufon/cufon-yui.js"></script> 
    <script type="text/javascript" src="js/Script_400.font.js"></script> 
</head> 

然後...

<body> 
    <!-- other body contents in here... --> 
    <script type="text/javascript"> 
      Cufon.now(); 
      Cufon.replace('#hd h2'); // Requires a selector engine for IE 6-7, hence 'sizzle.js' dependency 
      Cufon.replace('h1,h2'); // Doesn't require selector engine 
    </script> 
</body>