Quantcast
Channel: Active questions tagged instafeedjs+jquery+javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 32

Instagram - Bootstrap 3 carousel with instafeedjs

$
0
0

I am using instafeedjs to display the pictures on a site. I am trying to add Bootstrap 3 carousel by following link. - http://www.tutorialrepublic.com/codelab.php?topic=bootstrap&file=carousel-methods.
When I run the code it displays nothing.

   <script type="text/javascript">  
    var feed = new Instafeed({  

        get: 'tagged',
        tagName: '****',
        clientId: '*************',
        limit: 20,
        sortBy: 'most-recent',
        template: '<div class="item"><img src="{{image}}"/></div>',
        success: function (data) {
            $('.carousel').carousel({ interval: 3000 });
            for (var i = 0; i < $(data.data).size() ; i++) {
          $('.carousel-inner').append('<div class="item"></div>');
       $('.item').append('<div class="col-sm-2 instagram-  placeholder"><img  src=' + data.data[i].images.standard_resolution.url + ' class="img-responsive"></div>');
            }  
            $('.carousel').carousel('next');

            },
            after: function () {
            $('#instafeed > div:nth-child(1)').addClass('active');
      }

   });
    feed.run();
</script>

Here is the HTML:

  <div id="carousel" class="carousel slide" data-interval="false">
    <div class="carousel-inner" id="instafeed"></div>
 </div>

Viewing all articles
Browse latest Browse all 32

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>