1
我寫了一個使用jQuery的腳本(http://jsfiddle.net/vishnukanwar/yqH5B/),它在頁面加載時顯示一個social-like_button div。雖然此div顯示其他所有內容都模糊不清。如何在Google Blogger中添加jQuery而無需修改模板?
我的麻煩是,這個jQuery腳本在我的桌面(本地和jsfiddle)上工作正常,但是一旦我發佈到Blogger,它不起作用。
我覺得Blogger不會同步加載jQuery(即使它被要求),這就是爲什麼它顯示'jQuery是未定義'的錯誤。
var jq = document.createElement('script');
//jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
jq.src = "https://code.jquery.com/jquery-1.10.1.min.js";
jq.onload = jq.onreadystatechange = loadPopupBox; // for function def check [link][2]
document.getElementsByTagName('head')[0].appendChild(jq);
誰能告訴我如何在Google Blogger中動態和同步添加jQuery而無需修改我的Blog模板?
我得到了解決方案:) –