JQuery 社会主义插件不工作

标签 jquery plugins jquery-plugins referenceerror

我正在使用这个插件,但我没有运气。 http://plugins.in1.com/socialist/demo

我正在使用运行提供的示例代码的 WampServer。

<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script src='./jquery.socialist.js'></script>
<link href="./jquery.socialist.css" rel="stylesheet" />
<script type="text/javascript">
$(document).ready(function(){
    $('#content').socialist({
        networks: [
            {name:'linkedin',id:'buddy-media'},
            {name:'facebook',id:'in1dotcom'},
            {name:'twitter',id:'in1dotcom'}
           ],
        isotope:false,
        random:false,
        fields:['source','heading','text','date','image','followers','likes']
    });
});
</script>
</head>
<body>
    <div id="content"></div>
</body>
</html>

我在 firebug 中不断收到此错误。

ReferenceError: $ is not defined
$(document).ready(function () {
index.html (line 8)

这会导致空白页。 有人可以分享他们对此的知识吗?它变成了一种痛苦

最佳答案

您应该包含 jQuery 的本地版本,因为如果在您尝试准备文档之前未加载 jQuery,则唯一可能发生这种情况的方法。

也许它受到了防火墙的保护,或者您在 api 页面上遇到了超时;换句话说:该插件与您的问题无关。

这里有类似的问题: Uncaught ReferenceError: $ is not defined?

关于JQuery 社会主义插件不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14055870/

相关文章:

javascript - 当达到最小值和最大值时,防止输入中显示额外的文本

javascript - 文件上传事件绑定(bind)

css - full calendar_scheduler - 如何在垂直议程日设置最小宽度资源列并进行水平滚动

javascript - Jquery 自动完成不附加

jquery - 如何在 CoffeeScript 中创建 jQuery 插件?

javascript - Aptana 3 删除包 (jquery)

vim - 在 VIM 中运行 conque 时不断弹出警告

c++ - 确定场景何时在 Maya 中完成加载

javascript - 在 "Error executing the insertHtml command"模式下插入 html 时 cleditor 中出现 "View Source"消息

jquery - UI 对话框按钮隐藏控件