dsimib1625 2017-02-24 11:21
浏览 141

Owl Carousel不适用于Jquery

I am trying to get carousel using owl-carousel which is working fine for some module but,i am trying to get instagram post giving limit to use carousel but its not working Below is my code.

Script.min.js

 var feed = new Instafeed({
    get: 'user',
    limit: 4,
    accessToken: "XXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXX",
    userId: XXXXXX,
    target: "homeInstagramWrapper",
    filter: function(image) {
      image.timeAgoInWords = moment(image.created_time * 1000).fromNow();
      return image;
    },
    template: '<div class="owl-carousel" id="owl-inspirations"><a class="instagram-image" href="{{link}}" target="_blank"><img src="{{model.images.low_resolution.url}}" /></a></div>'
  } );
  feed.run();

My another code :

LandingPage.php

  <div class="instagram-wrapper track-all-links" data-sm-network="instagram">
              <h3><i class="bits-sm-icon-instagram-black"></i> Instagram <a href="https://instagram.com/XXXXX" target="_blank" class="text-gray">XXX</a></h3>
                <div id="homeInstagramWrapper">
                </div>
 </div>
<script>
jQuery(document).ready(function($){
jQuery("#owl-inspirations").owlCarousel({
    items : 2,
    lazyLoad : true,
    navigation : true,
    pagination : false,
    navigationText: [
        '<button type="button" data-role="none" class="slick-prev"  id="left-button">Previous</button>',
        '<button type="button" data-role="none" class="slick-next" id="right-button">Next</button>'
    ],

});
});
</script>

Using id 'owl-inspiration' is not able to call jquery in landing page from script.min.js.Is there any solution for this issue.

Any help will be appreciated. thanks

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于无人驾驶的航向角
    • ¥15 keil的map文件中Image component sizes各项意思
    • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 Centos / PETGEM
    • ¥15 划分vlan后不通了
    • ¥20 用雷电模拟器安装百达屋apk一直闪退