Cufon装载问题

时间:2011-04-06 12:50:51

标签: codeigniter cufon

我以前曾经使用过cufon很多次而且从来没有遇到过问题,但无论我对这个安装做什么,我都会得到一个firebug错误:“cufon没有定义”。

我的页面编写不多,所以我会在这里发布一个链接,以便您可以看到它的实际效果:http://www.stormcouriers.com/testimonials

我正在使用以下代码来包含文件:

<link type="text/javascript" href="system/pyrocms/themes/minimal/assets/js/cufon-yui.js"/>
<link type="text/javascript" href="system/pyrocms/themes/minimal/assets/js/microgramm_400-microgramm_400.font.js"/>
<link type="text/javascript" href="system/pyrocms/themes/minimal/assets/js/jquery-1.4.2.min.js"/>
<link type="text/javascript" href="system/pyrocms/themes/minimal/assets/js/html5.js"/>
<link type="text/javascript" href="system/pyrocms/themes/minimal/assets/js/common.js"/>

<script type="text/javascript">
    Cufon.replace('h2');
    Cufon.now();
</script>

所有js文件都正确加载,所以我正在摸不着头脑。我能看到的唯一问题是我使用的是一个codeigniter CMS,在CI和Cufon之间的网络上有一些帖子。任何帮助将不胜感激。

由于

戴夫

1 个答案:

答案 0 :(得分:0)

好的想通了 - 在查看源代码时,正常添加javascript到codeignitor主题似乎工作,但不在页面中运行。使用Pyrocms我最终使用:

包含js文件

{pyro:theme:js file =“js / cufon-yui.js”}

这使得javascript正确加载,因此Cufon工作。