开发者

Cufon in Facebox

Does anyone have pointers for displaying Cufon in Facbox?

I have recently implemented Cufon fonts which work fine, but when it is displayed in a Cufon dialog they arent being displayed on top. I can see that it is substituted though. I know this may have something to do with z-index but wonder exactly on what element/tag? I have tried on nearly al开发者_如何学Pythonl the tags from #facebox to the h1 tag inside the Facebox dialog.

Any pointers?


I think it may be because the Facebook is loaded in the DOM after you call and apply Cufon.

The (inelegant) solution would be to put a Cufon call in the HTML you're adding to the Facebox.

jQuery.facebox(function() { 
    jQuery.get('your-url.html', function(data) {
        jQuery.facebox(data + "<script>Cufon.replace('.selector');</script>")
    });
});


Cufon should start after loading the Facebox for the content appears

$(document).bind('reveal.facebox', function() { Cufon.replace('h3'); })
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜