您在脑海中包含 jQuery,然后包含 cookie 插件,但在页面底部您会看到:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
// You may specify partial version numbers, such as "1" or "1.3", with the same result. Doing so will automatically load the latest version matching that partial revision pattern
// (e.g. 1.3 would load 1.3.2 today and 1 would load 1.4.1).
google.load("jquery", "1");
google.setOnLoadCallback(function() {
// Place init code here instead of $(document).ready()
$(".euro").parseNumber({format:"#,###", locale:"it"});
$(".euro").formatNumber({format:"#,###", locale:"it"});
})
</script>
它使用谷歌加载器再次加载 jQuery。因为您再次加载 jQuery,所以直接附加到文档头部的 jQuery 命名空间(而不是原型)的任何内容都会被删除。
所以归根结底,你到底为什么要加载 jQuery 两次?
解决方案:
删除 google 加载器并请求它从主页的页脚加载 jQuery。