0

I am using InstaFeed to get images from Instagram and show them on a website.

Here's my code:

    <script type='text/javascript' src='/js/jquery/jquery.js?ver=1.11.2'></script>
<script type="text/javascript">

        var feed = new Instafeed({
            get: 'tagged',
            tagName: 'test',
            clientId: '0000000000000000000',
            limit: 6,
            after: function () {
                var images = $("#instafeed").find('a');
                $.each(images, function(index, image) {
                    var delay = (index * 75) + 'ms';
                    $(image).css('-webkit-animation-delay', delay);
                    $(image).css('-moz-animation-delay', delay);
                    $(image).css('-ms-animation-delay', delay);
                    $(image).css('-o-animation-delay', delay);
                    $(image).css('animation-delay', delay);
                    $(image).addClass('animated flipInX');
                });
            },
            template: '<a href="{{link}}" target="_blank"><img src="{{image}}" /><div class="likes">&hearts; {{likes}}</div></a>'
        });
        feed.run();

    </script>

    <div id="instafeed"></div>

I'm pretty new to JS and JQuery, but I'm not sure why I get this error. The error is on the following line:

var images = $("#instafeed").find('a');

janlindso
  • 1,146
  • 2
  • 13
  • 41

1 Answers1

1

Seems you don't have jQuery loaded.

Add the following before your script block

<script src="path to your jquery file"></script>

and change the path to point to the URL on your server where jQuery can be accessed.

potatopeelings
  • 38,000
  • 6
  • 80
  • 108