jsanahuja/jquery.instagramFeed

InstagramFeed.js:218 Uncaught TypeError: Cannot set property 'innerHTML' of null

Closed this issue · 1 comments

Hey guys. I tried using https://github.com/jsanahuja/InstagramFeed. Getting the following error when trying to use it:

VM140 InstagramFeed.js:218 Uncaught TypeError: Cannot set property 'innerHTML' of null
at Object.display (VM140 InstagramFeed.js:218)
at VM140 InstagramFeed.js:226
at XMLHttpRequest.xhr.onload (VM140 InstagramFeed.js:96)

Here's my implementation:

<script src="js/InstagramFeed.js"></script> <script> (function(){ new InstagramFeed({ 'username': 'screentek', 'container': document.getElementById("instagram-feed1"), 'display_profile': true, 'display_biography': true, 'display_gallery': true, 'callback': null, 'styling': true, 'items': 8, 'items_per_row': 4, 'margin': 1 }); })(); </script>

And then of course the div.

Did you guys run into this? Seems like I'm doing something wrong or something has changed?

My bad. I needed to put the div above the script. Or rather take the script out of the head and put it below the div.