how to insert custom js file ?
Permalink
Hi,
I'm currently designing a theme, and wanted to try cufon (http://cufon.shoqolate.com/generate/), a solution for remplacing title fonts by its own font. Just like Sifr does.
I'm not a javascript guru, I usually use html/css, and I can't find how to call my file from header.php.
I copied it absolutely everywhere :) but no success. Is there a syntax or somewhat for sur calls ?
Thanks,
Mael
I'm currently designing a theme, and wanted to try cufon (http://cufon.shoqolate.com/generate/), a solution for remplacing title fonts by its own font. Just like Sifr does.
I'm not a javascript guru, I usually use html/css, and I can't find how to call my file from header.php.
I copied it absolutely everywhere :) but no success. Is there a syntax or somewhat for sur calls ?
Thanks,
Mael
I have it running on a site Im working on. I put the following code in the header.php file. You will also need to put the 2 .js files in your theme root directory (borders_360.font.js is the font Im using, create your font here:http://cufon.shoqolate.com/generate/... ). Then, if you add any text with the html code <h1>, it will display as your embedded cufon font.
<!-- cufon font trick http://wiki.github.com/sorccu/cufon/usage/... /-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="themes/saltpepper/cufon-yui.js" type="text/javascript"></script>
<script src="themes/saltpepper/borders_360.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1');
</script>
<!-- cufon font trick http://wiki.github.com/sorccu/cufon/usage/... /-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="themes/saltpepper/cufon-yui.js" type="text/javascript"></script>
<script src="themes/saltpepper/borders_360.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1');
</script>
Does anyone know if you can replace multiple h tags(h1 h2 h3 h4 and em?) and multiple styles (bold light italic etc)...
cheers
;-P
cheers
;-P
I havent tried different tags myself, but it seems easily doable, and its listed in here:
http://wiki.github.com/sorccu/cufon/usage/...
http://wiki.github.com/sorccu/cufon/usage/...
just edited.