Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6607141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:28:16+00:00 2026-05-25T19:28:16+00:00

Initially cufon replaces the main page text. After loading another page file, cufon doesn’t

  • 0

Initially cufon replaces the main page text.

After loading another page file, cufon doesn’t apply it’s replacement to the newly loaded content. Why?

I added cufon.refresh(); as the very last of the chained functions. I notice cufon is trying to replace the font, how ever it seems like the default font is overriding the cufon font. I notice the cufon changed font briefly before it defaults back to the regular font. So I know it’s attempting to replace the text.

Maybe my order of operations are wrong? Any help is appreciated. If my code is messy as is, feel free to clean it up, always open for suggestions.

Here’s my code:

$(document).ready(function(){
    $.ajaxSetup({cache:false});
    // Hide Colored Lines                      
    $("div#line-2,div#line-3,div#line-4,div#line-5,div#line-6,div#line-7,div#line-8,div#line-9,div#line-10").hide();
    $("div#linksContainer a, div#meContainer a").click(function(){
        var toLoad = $(this).attr('href')+' #homeContent';                               
        var post_id = $(this).attr("rel");
        if(post_id == "25"){
            $("#home").fadeIn(2400);
            $("div#line-1").animate({height: 'toggle'},1200);   
            $("div#line-2,div#line-3,div#line-4,div#line-5,div#line-6,div#line-7,div#line-8,div#line-9,div#line-10").hide();
        }else if(post_id == "5"){
            $("#home").hide('fast');
            $("div#line-2").animate({height: 'toggle'},1200);
            $("div#line-1,div#line-3,div#line-4,div#line-5,div#line-6,div#line-7,div#line-8,div#line-9,div#line-10").hide();
        }else if(post_id == "7"){
            $("#home").hide('fast');
            $("div#line-3").animate({height: 'toggle'},1200);
            $("div#line-2,div#line-1,div#line-4,div#line-5,div#line-6,div#line-7,div#line-8,div#line-9,div#line-10").hide();
        }else if(post_id == "337"){
            $("#home").hide('fast');
            $("div#line-4").animate({height: 'toggle'},1200);
            $("div#line-2,div#line-3,div#line-1,div#line-5,div#line-6,div#line-7,div#line-8,div#line-9,div#line-10").hide();
        }else if(post_id == "13"){
            $("#home").hide('fast');
            $("div#line-5").animate({height: 'toggle'},1200);
            $("div#line-2,div#line-3,div#line-4,div#line-1,div#line-6,div#line-7,div#line-8,div#line-9,div#line-10").hide();
        }else if(post_id == "339"){
            $("#home").hide('fast');
            $("div#line-6").animate({height: 'toggle'},1200);
            $("div#line-2,div#line-3,div#line-4,div#line-5,div#line-1,div#line-7,div#line-8,div#line-9,div#line-10").hide();
        }else if(post_id == "341"){
            $("#home").hide('fast');
            $("div#line-7").animate({height: 'toggle'},1200);
            $("div#line-2,div#line-3,div#line-4,div#line-5,div#line-6,div#line-1,div#line-8,div#line-9,div#line-10").hide();
        }else if(post_id == "212"){
            $("#home").hide('fast');
            $("div#line-8").animate({height: 'toggle'},1200);
            $("div#line-2,div#line-3,div#line-4,div#line-5,div#line-6,div#line-7,div#line-1,div#line-9,div#line-10").hide();
        }else if(post_id == "11"){
            $("#home").hide('fast');
            $("div#line-9").animate({height: 'toggle'},1200);
            $("div#line-2,div#line-3,div#line-4,div#line-5,div#line-6,div#line-7,div#line-8,div#line-1,div#line-10").hide();
        }else if(post_id == "16"){
            $("#home").hide('fast');
            $("div#line-10").animate({height: 'toggle'},1200);
            $("div#line-2,div#line-3,div#line-4,div#line-5,div#line-6,div#line-7,div#line-8,div#line-9,div#line-1").hide();
        }
        $('#homeContent').hide('fast',loadContent);
        $('#load').remove();
        $('#wrapper').append('<span id="load">LOADING...</span>');
        $('#load').fadeIn('normal');
        function loadContent(){
            $("#homeContent").load(toLoad,{id:post_id},showNewContent());
        }
        function showNewContent(){
            $("#homeContent").show('fast',hideLoader());
        }
        function hideLoader() {
        $('#load').fadeOut('normal',changeFonts());
        }
        function changeFonts(){
            Cufon.refresh();    
        }
        return false;
    });
Cufon.replace('h1, h2, p, strong', { fontFamily: 'Museo 300' });  
Cufon.replace('h3, h4, h5, h6, #postContent a', { fontFamily: 'Quicksand Book' });
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:28:17+00:00Added an answer on May 25, 2026 at 7:28 pm

    change

    $('#load').fadeOut('normal',changeFonts());
    

    to

    $('#load').fadeOut('normal',changeFonts);
    

    and it should be alright.

    Same goes for your other animation/load callbacks, you want to pass the function objects, not their return value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Initially I ran rails g scaffold Post title:string content:text and after migrating everything worked
Initially I wanted a checkmark where the text is placed on the left of
Initially i was planning to use master page for every page in my application.
Initially I was looking for an answer to show/hide a page jumping issue. Having
We initially didn't use any logging or debug tracing but after spending few weeks
The file is initially $cat so/app.yaml application: SO ... I run the following command.
If we initially check-in a configuration-type file as an item into a StarTeam project,
Initially i was after a BigDecimal with more functionality than the simple +-*/ which
Initially I have this layout: <ul id=state_${abbr}></ul> on the jsp page and I need
Initially, I used a .js file that contains AJAX functions to call a .php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.