我是 JavaScript 编程领域的新手。
我正在尝试让该插件在 WordPress 上运行,但收到此错误:
Uncaught ReferenceError: PhotoBlocks is not defined
at HTMLDocument.<anonymous> (?p=40:408)
at j (jquery-2.1.4.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.1.4.min.js:2)
at Function.ready (jquery-2.1.4.min.js:2)
at HTMLDocument.I (jquery-2.1.4.min.js:2)
最佳答案
这个问题有两个问题。首先,两个 jQuery 被添加到您的文件中
此外,您需要更改:
$(document).ready(function(){
'enter code here'
});
至
(function(){
'enter code here'
})(jQuery);
关于javascript - Uncaught ReferenceError : jquery-2. 1.4.min,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49606584/