Search code examples
jquerypluginsjquery-pluginsreferenceerrorjquery-socialist

JQuery Socialist Plugin Not Working


I am using this plugin but I'm having no luck with it. http://plugins.in1.com/socialist/demo

I Am using a WampServer running the example code provided.

<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>

I keep getting this error in firebug.

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

This results in a blank page. Could someone please Share their knowledge on this? Its becoming a Pain


Solution

  • You should include a local version of jQuery because the only way this can happen if the jQuery is not loaded before you try to do document ready.

    Maybe it gets firewalled or you get a timeout from the api page; in other words: the plugin has nothing to do with your problem here.

    A similar problem here: Uncaught ReferenceError: $ is not defined?