带有instafeed.js的Bootstrap Carousel(循环两个图像)

时间:2016-02-25 16:01:19

标签: jquery twitter-bootstrap carousel

所以我有以下JS: -

// InstaFeed

var userFeed = new Instafeed({
    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');
    }
});
userFeed.run();

使用以下HTML: -

<span id="insta-container">
    <div id="myCarousel" class="carousel slide" data-interval="3000000" data-ride="carousel">
        <div id="instafeed" class="carousel-inner"></div>
    </div>
</span>

基本上每个项目都包含一个图像,我希望每个项目显示两个图像。目前是: -

<div class="item">
    <a href="https://www.instagram.com/p/BBnf3UjHPyH/" target="_blank"><img class="img-insta" src="//scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12716973_1720509661501439_1218058765_n.jpg?ig_cache_key=MTE4MjA1MzU2ODI4NTA0Nzk0Mw%3D%3D.2" alt="Got my Magic Mouse 2 #apple"></a>
</div>

我需要的是: -

<div class="item">
    <a href="https://www.instagram.com/p/BBnf3UjHPyH/" target="_blank"><img class="img-insta" src="//scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12716973_1720509661501439_1218058765_n.jpg?ig_cache_key=MTE4MjA1MzU2ODI4NTA0Nzk0Mw%3D%3D.2" alt="Got my Magic Mouse 2 #apple"></a>
    <a href="https://www.instagram.com/p/BBnf3UjHPyH/" target="_blank"><img class="img-insta" src="//scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12716973_1720509661501439_1218058765_n.jpg?ig_cache_key=MTE4MjA1MzU2ODI4NTA0Nzk0Mw%3D%3D.2" alt="Got my Magic Mouse 2 #apple"></a>
</div>

任何帮助将不胜感激! :)

0 个答案:

没有答案