前提・実現したいこと
Instagramのスライダー表示がうまくいかないのでご教授いただければ幸いです。
宜しくお願い致します。
①InstagramからInstafeedを用いて投稿している画像を引っ張って表示。
②なおかつ、その表示をjQuery simplyScrollを用いてスライダー表示させる。
上記の②がうまくいかず、スライダーで表示させたいです。
JSは以下の通りです。
画像取得 Instafeed.js
スライダー jQuery simplyScroll
発生している問題・エラーメッセージ
スライドを10枚表示させていますが、スライドにならず全体が固定で表示されている。
該当のソースコード
HTML
1<!doctype html> 2<html lang="ja"> 3 4<head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width"> 7 <link rel="stylesheet" media="all" href="css/style.css"> 8 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> 9 <script src="js/script.js"></script> 10 <link href="https://fonts.googleapis.com/css?family=Playball&display=swap" rel="stylesheet"> 11 <link href="https://fonts.googleapis.com/css?family=Damion&display=swap" rel="stylesheet"> 12 <script src="./js/pretty-scroll.min.js"></sript> 13 <script src="https://unpkg.com/pretty-scroll@1.1.4/js/pretty-scroll.js"></script> 14 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> 15 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> 16 <script type="text/javascript" src="/js/jquery.simplyscroll.js"></script> 17 <script type="text/javascript" src="js/instafeed.min.js"></script> 18 19 20 21<script type="text/javascript"> 22var feed = new Instafeed({ 23 clientId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 24 get: 'user', 25 userId: 'xxxxxxxxxx', 26 accessToken:'xxxxxxxxx.xxxxxxxx.xxxxxxxxxxxxxxxxxxxxx', 27 links: true, 28 limit: 10, // 取得件数 29 resolution:'thumbnail', // thumbnail (default) - 150x150 | low_resolution - 306x306 | standard_resolution - 612x612 30 template: '<a href="{{link}}"><img src={{image}} alt={{caption}}></a>' // 画像URL:{{image}} リンク:{{link}} キャプションテキスト{{caption}} いいね数:{{likes}} コメント数:{{comments}} 31}); 32feed.run(); 33</script> 34 35 36 37 38</head> 39 40 41 42 43<body> 44 45 <div id="scroller"> 46 <ul id="instafeed" class="clearfix"></ul> 47 </div> 48 49<style type="text/css"> 50 #instafeed { 51 margin-bottom: 25px; 52 text-align: center; 53 position: relative; 54 top: -400px; 55 } 56 57 .simply-scroll-container { 58 position: relative; 59 } 60 61 .simply-scroll-clip { 62 position: relative; 63 overflow: hidden; 64 } 65 66 .simply-scroll-list { 67 overflow: hidden; 68 margin: 0; 69 padding: 0; 70 } 71 72 .simply-scroll-list li { 73 float: left; 74 padding: 0; 75 margin: 0; 76 width: 150px; 77 height: 150px; 78 list-style: none !important; 79 } 80 81 .simply-scroll-list li img { 82 display: block; 83 } 84 85 .table table td { 86 vertical-align: top; 87 } 88</style> 89 90 91</body></html> 92
試したこと
補足情報(FW/ツールのバージョンなど)
参考サイト
・https://www.next.inc/articles/2015/jquery-instagram-feed.html
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/01/15 16:32