...

View Full Version : Cufon not working in IE8 (shocker)



thegreatpursuit
11-08-2010, 07:09 AM
It seems like IE is always causing me trouble.

Anyway, here's my site:

The Tickets Guide (http://theticketsguide.com)

My front page headline ("Learn how to become....") shows Cufon'd text in Firefox, but that goes bye-bye in IE8 for some reason.

Here's my code:


Cufon.replace('#homeheadline', {
fontFamily: 'Kozuka Gothic Pro L',
textShadow: '1px 1px #1f1f1f',
});

Cufon.replace('ul.menu', { fontFamily: 'Kozuka Gothic Pro L' });

Cufon.replace('.ticket-broker-blueprint h1', {
fontFamily: 'Kozuka Gothic Pro L',
});

I'm on the Thesis theme for Wordpress.

Can someone help me? I've been looking for an answer for hours!

Brandon

digitalclubb
11-08-2010, 10:29 AM
For IE you have to activate the cufon itself.

Stick the following, above the closing body tag and any tracking tags:


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

For usage, the following page is awesome:

https://github.com/sorccu/cufon/wiki/Usage

Good luck..

SB65
11-08-2010, 11:05 AM
Cufon.now()helps to prevent a flash of unstyled content in IE, but the absence of it shouldn't cause a complete failure.

I suspect the issue is your trailing commas:


Cufon.replace('#homeheadline', {
fontFamily: 'Kozuka Gothic Pro L',
textShadow: '1px 1px #1f1f1f',
});

Cufon.replace('ul.menu', { fontFamily: 'Kozuka Gothic Pro L' });

Cufon.replace('.ticket-broker-blueprint h1', {
fontFamily: 'Kozuka Gothic Pro L',
});

These are causing IE to choke I think. Get rid of them and see how that goes.

thegreatpursuit
11-08-2010, 04:40 PM
Removing the trailing commas doesn't help, although I got closer to figuring out the problem. When I target the H1 tags, Cufon suddenly works! Like this:


Cufon.replace('h1', {
fontFamily: 'Kozuka Gothic Pro L',
textShadow: '1px 1px #1f1f1f'});

The problem is when I target div tags. Obviously, I want to be able to target specific div tags, not just all my H1s on my site.

Still stumped,

Brandon

EDIT: I know I'm typing in the div tags correctly because they work perfectly in Firefox.

digitalclubb
11-08-2010, 05:08 PM
Have you loaded a framework like jQuery before Cufon? I think it needs to use a libraries selector engine if you want to use specific selectors..

thegreatpursuit
11-08-2010, 05:16 PM
Have you loaded a framework like jQuery before Cufon? I think it needs to use a libraries selector engine if you want to use specific selectors..

Aha! You're amazing!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum