cufon is not a function
Offff dont understand why I get cufon.font is not a function error. I followed all the instructions at its website.
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/Futura_Lt_BT_400.font.js"开发者_如何学编程></script>
<script type="text/javascript">
$(document).ready(function()
{
Cufon.replace('.starter .content');
}
<div class="starter">
<div class="image-1">
<div class="wrapper">
<div class="content">Family guy funny show.</div>
</div>
</div>
<div class="image-2">
<div class="wrapper">
<div class="content">Family guy funny show.</div>
</div>
</div>
<!-- <img src="images/logo_fg.png" alt="Logo" class="logo" /> -->
</div>
Website is at http://www.pangeaadvisors.org/IDC/
Any suggestion appreciated!
The error is not in your main page, it's in Futura_Lt_BT_400.font.js
.
The line starts with:
Cufon.FuturaLightFont({"w":207,"face":{"font-family":"Futura Lt BT" ...
Normally, these JS files start with Cufon.registerFont
. Where did this JS file come from? Did you use the Font Generator from the Cufon website?
Update: The inline JS is also malformed. It should be:
$(document).ready(function()
{
Cufon.replace('.starter .content');
});
Note the extra );
on the last line.
精彩评论