我有一個關於與WordPress和jQuery問題的問題:我已經注意到,WordPress的有自定義模板的引入jQuery插件的更多問題:
在一個字,當我把頭像裏面的代碼就像我寫了一個deblug函數,如 $(document).ready(function(){alert(「ciao」)});
他不工作,firefox調試告訴我「$不是一個函數」。
如果我把裏面的代碼頁腳是這樣的:
jQuery(document).ready(function() {
alert("ciao");
});
</script>
我sospiceus是WordPress的內部有it..but更多的JS庫,如果我寫
(function($) {
$ Works! You can test it with next line if you like
console.log($);
})(jQuery);
$接受它(理論上)..爲什麼這一切?