我以前用过很多次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之间的问题网上有一些帖子。任何帮助都将不胜感激。
谢谢
戴夫
发布于 2011-04-07 17:18:45
Ok解决了这个问题-将javascript正常添加到codeignitor主题中,当你查看源代码时似乎可以工作,但不能在页面中运行。使用Pyrocms,我最终使用以下命令包含了js文件:
{pyro:主题:js file="js/cufon-yui.js"}
这使得javascript加载正确,因此Cufon可以工作。
https://stackoverflow.com/questions/5566632
复制相似问题