Question

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

Was it helpful?

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?

OTHER TIPS

How do I specify to list only the latest feeds from FB and Twitter?

Actually if you check the jquery script tag in your code:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>

you can see that the link itself is not correct. You used only // not http://

The good link is:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>

Correct the link and you're ready to go.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top