treehouse : what would you like to learn today?
Web Design Web Development iOS Development

sIFR: Loading multiple fonts into the same site.

  • Hi,

    I've bumped into a problem when trying to get 2 non-standard fonts to work on the same site useing sIFR.
    So, the problem is, I've added this to my javascript file:

    var didot = {
    src: 'js/didot.swf‘
    };

    sIFR.activate(didot);

    sIFR.replace(didot, {
    selector: 'h2.cpost-title',
    wmode: 'transparent'
    });


    var standard_07_57 = {
    src: 'js/standard_07_57.swf‘
    };

    sIFR.activate(standard_07_57);

    sIFR.replace(standard_07_57, {
    selector: 'h1.cpost-title',
    wmode: 'transparent'
    });


    Were "didot" is my first font and "standard_07_52" is my second. Now I should be able to call "didot" into every <H2> in my HTML file and "standard_07_52" to every <H1> like this:

     
    <div id=\"randomDiv\">
    <h2 class=\"cpost-title\">Didot font goes here</h2>
    <h1 class=\"cpost-title\">Standard font goes here</h1>
    </div>


    But, I always end up just getting the "didot" font on both. I've made 2 swf files aswell and all that ... and tried to take away the transperency... Any one got a suggestion?

    /Zhelle