2

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

dbc
  • 104,963
  • 20
  • 228
  • 340
ChristopherStrydom
  • 7,338
  • 5
  • 21
  • 34

3 Answers3

2

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?

Community
  • 1
  • 1
povilasp
  • 2,386
  • 1
  • 22
  • 36
  • 1
    A general way to solve the problem without actually solving the problem. Not always the best way to proceed though – Alexander Dec 27 '12 at 14:09
  • 1
    Thanks! Did the trick but i needed to have the other source files in the same folder to. like this ` ` – ChristopherStrydom Dec 27 '12 at 14:57
  • 1
    @Alexander, couldn't aggree with you more. But there are actually times when this general way is just the thing you need. Like if session_start() is not working because headers are already sent you check for invisible characters in the begining, etc. Sometimes the problem is not general, it's just simple, and needs simple solution. – povilasp Dec 27 '12 at 15:23
0

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

0

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.

  • Thanks for the input but I'm not using this anymore so I can't test your solution. Thanks again though! hopefully someone else can use this – ChristopherStrydom Jan 06 '14 at 22:28