2017年10月19日 星期四

jquery-lang-js 翻譯檔裡面若有 '< br >' 無法顯示出來

所以我改寫了一些東西

$(function () {
// Setup data on the language items
self._start();

// Check if the current language is not the same as our default
if (currentLang && currentLang !== self.defaultLang) {
// Switch to the current language
self.change(currentLang);
}
self.parseHTML();
});

$(".parseHTML").each(function(){
var html = $.parseHTML($(this).text());
$(this).empty();
$(".parseHTML").append(html);
})
}


有特殊標籤的加上 parseHTML 這個class

就行了

沒有留言:

張貼留言