Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Aug 2010
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Cufon not working in IE8 (shocker)

    It seems like IE is always causing me trouble.

    Anyway, here's my site:

    The Tickets Guide

    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:

    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

  • #2
    New Coder
    Join Date
    Nov 2010
    Location
    London, UK
    Posts
    40
    Thanks
    1
    Thanked 4 Times in 4 Posts
    For IE you have to activate the cufon itself.

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

    Code:
    <script type="text/javascript"> Cufon.now(); </script>
    For usage, the following page is awesome:

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

    Good luck..

  • #3
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,955
    Thanks
    9
    Thanked 726 Times in 720 Posts
    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:

    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',
    });
    These are causing IE to choke I think. Get rid of them and see how that goes.

  • #4
    New Coder
    Join Date
    Aug 2010
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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:

    Code:
    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.
    Last edited by thegreatpursuit; 11-08-2010 at 03:43 PM.

  • #5
    New Coder
    Join Date
    Nov 2010
    Location
    London, UK
    Posts
    40
    Thanks
    1
    Thanked 4 Times in 4 Posts
    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..

  • Users who have thanked digitalclubb for this post:

    thegreatpursuit (11-08-2010)

  • #6
    New Coder
    Join Date
    Aug 2010
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by digitalclubb View Post
    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •