Instagram - Bootstrap 3 Carousel With Instafeedjs
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&a
Solution 1:
Here is the code that supports carousel on loaded feeds. The number of image is limited the the value set by the instafeed property 'limit' and the carousel runs infinitely.
HTML
<html><head><title>Example of Bootstrap 3 Carousel with Instafeed Instagram feeds - Ajith</title><linkrel="stylesheet"href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"><linkrel="stylesheet"href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"><scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script><scriptsrc="http://sriajith.info/blog/wp-content/uploads/2015/05/instafeed.min_.js"></script></head><body><divclass="bs-example"><divid="myCarousel"class="carousel slide"data-interval="3000"data-ride="carousel"><divclass="carousel-inner"id="instafeed"></div></div></div></body></html>
JavaScript
<scripttype="text/javascript">var feed = newInstafeed({
get: 'tagged',
tagName: 'ajith',
clientId: '467ede5a6b9b48ae8e03f4e2582aeeb3',
limit: 20,
sortBy: 'most-recent',
resolution: "low_resolution",
template: '<div class="item"><img src="{{image}}"/></div>',
after: function () {
$('#instafeed > div:nth-child(1)').addClass('active');
}
});
feed.run();
</script>
Find the working demo here
Post a Comment for "Instagram - Bootstrap 3 Carousel With Instafeedjs"