0
這是我的問題。我有以下代碼(我拿走了無關緊要的部分):Cufon.refresh意外行爲
$('.poll').click(function (e) {
$.post('/my/ajax/script', {}, function(d) {
j = $.parseJSON(d);
var el = $('#my_msg').find('.message-text').find('p');
// That p has class which was consumed by Cufon at document ready
el.html(j.message);
$('#my_div').fadeIn(fadeTime, function() { Cufon.refresh(); });
});
}
e.preventDefault();
});
如果我刪除Cufon.refresh
回調,一切正常(含彈出顯示j.message
向上)。但是如果我離開它,文本只會被部分渲染(最後一個詞缺失,整個文本不可見)。
這種行爲的原因是什麼?
你能告訴我們[小提琴](http://jsfiddle.net/)嗎? –