• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 844
  • Last Modified:

cufon type is invisible in prettyPhoto modal window

After experimenting with cufón for two days, one issue persists:  Cufón type  does not display in the prettyPhoto modal window.

My test page: http://www.wpt.org/mfh/

The link in question:  Click on the cufón text under Jane Kaczmarek's photo:  "Wisconsin's Nazi Resistance ... " The prettyPhoto window opens correctly displaying embedded video and copy.

The problem: The cufón text is invisible. Hover the space above the body copy and you'll see the header (it's a link) bottom border appear.

I saw that this problem was addressed in this forum here: http://tinyurl.com/3zfxb2u but I'm out of my element when it comes to jQuery.  I haven't the faintest clue how to implement jQuery.noConflict();.

(Note: Our site uses sIFR type for some of our h2 and h1 headlines. While looking for alternatives to sIFR, I've commented out links to sIFR javascript and styles on this index.cfm).

Thanks for your attention.
0
BekettDog
Asked:
BekettDog
1 Solution
 
David S.Commented:
Your problem seems to be different from the one in that other question.

Your problem seems to be because Cufón only automatically works on elements that exist when it's initialized. To make it work with elements that are generated dynamically, you need to call Cufon.refresh(). The trick is finding the right place to make the call to that function though.

Try changing this:
$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_square'});
});

Open in new window

to this:
$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto({
		theme:'light_square',
		changepicturecallback: function(){Cufon.refresh()}
	});
});

Open in new window

0
 
BekettDogAuthor Commented:
Kravimir,

You solved it!

Thank you SO much for an elegant, well-explained solution.

To the E-E moderator: Thank you so much for expanding my original zones and finding the expert with the answer. What a terrific service.

With much gratitude,

BekettKN
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now