forked from jsanahuja/jquery.instagramFeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
679 lines (637 loc) · 30.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>jquery.instagramFeed</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<script src="https://www.sowecms.com/demos/statics/prism.js"></script>
<link rel="stylesheet" type="text/css" href="https://www.sowecms.com/demos/statics/prism.css">
<style>
.bg-primary-2 {
background-color: #3779B3;
}
.bg-secondary-2 {
background: #cbdbe8;
}
.text-underline {
text-decoration: underline;
}
.text-bold {
font-weight: 700;
}
.text-italic {
font-style: italic;
}
.text-small {
font-size: 0.8em;
}
.flex-grow-1 {
flex-grow: 1;
}
#btn-top {
position: fixed;
z-index: 999;
bottom: 1em;
top: auto;
left: auto;
right: 1em;
margin-left: -1.9rem;
opacity: .66;
display: none;
}
.instagram_feed {
overflow:hidden;
}
#jsonHere {
max-height: 60vh;
overflow: auto;
}
</style>
</head>
<body>
<header id="header" class="bg-primary-2">
<div class="container py-4">
<div class="row">
<div class="col-xs-12 col-md-8">
<h1 class="text-white m-0"> Documentation jquery.instagramFeed </h1>
<p class="text-white m-0">Instagram Feed without access token. We like Instagram but hate his API</p>
<ul class="list-inline menu-navigation pt-3">
<li class="list-inline-item"><a class="text-white" href="#options">Options</a></li>
<li class="list-inline-item"><a class="text-white" href="#examples">Examples</a></li>
</ul>
</div>
<div class="col-xs-12 col-md-4">
<ul class="list-unstyled text-md-right">
<li>
<a class="text-white text-underline d-flex align-items-center" target="_blank" rel="noopener"
href="https://github.com/jsanahuja/jquery.instagramFeed">
<span class="mr-2 flex-grow-1">Visit our repository</span>
<svg class="octicon octicon-mark-github v-align-middle" fill="white" height="32" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
</li>
<li class="pt-2">
<a class="text-white text-underline d-flex align-items-center" target="_blank" rel="noopener"
href="https://www.paypal.me/JavierSL">
<span class="mr-2 flex-grow-1">Support us</span>
<svg class="octicon v-align-middle" fill="white" height="32" width="32" viewBox="0 0 32 32"><path d="M29.41 11.535c.215 1 .192 2.215-.07 3.645-1.035 5.285-4.399 7.925-10.09 7.925h-.785a1.17 1.17 0 0 0-.785.297 1.29 1.29 0 0 0-.43.758l-.07.34-.985 6.18-.035.265a1.27 1.27 0 0 1-.437.762c-.23.195-.496.293-.793.293h-4.485a.715.715 0 0 1-.59-.27.806.806 0 0 1-.16-.64c.11-.668.266-1.668.473-3 .21-1.332.367-2.332.477-3 .105-.668.265-1.664.48-2.992.215-1.328.375-2.325.48-2.993.063-.437.317-.66.77-.66h2.34c1.582.024 2.988-.101 4.215-.375 2.082-.465 3.789-1.32 5.125-2.57 1.215-1.133 2.136-2.594 2.765-4.395.285-.832.496-1.625.625-2.375.012-.07.028-.113.047-.132a.06.06 0 0 1 .063-.016.263.263 0 0 1 .105.063c.942.699 1.524 1.664 1.75 2.89zM26.34 6.5c0 1.273-.274 2.68-.82 4.215-.954 2.773-2.75 4.648-5.395 5.625-1.344.476-2.844.726-4.5.75 0 .012-.535.015-1.605.015l-1.61-.015c-1.191 0-1.89.57-2.105 1.715-.024.093-.532 3.25-1.52 9.465-.012.117-.082.175-.215.175H3.305a.833.833 0 0 1-.653-.293.831.831 0 0 1-.207-.687L6.59 1.195c.058-.343.223-.629.492-.855C7.348.113 7.656 0 8 0h10.68c.402 0 .984.078 1.738.23.758.157 1.422.348 1.992.575 1.274.488 2.246 1.218 2.922 2.195.672.977 1.008 2.145 1.008 3.5zm0 0" /></svg>
</a>
</li>
<li class="pt-3">
<a class="text-white text-right" target="_blank" rel="noopener"
href="https://travis-ci.com/jsanahuja/jquery.instagramFeed">
<img src="https://travis-ci.com/jsanahuja/jquery.instagramFeed.svg?branch=master" alt="Build Status" />
</a>
</li>
</ul>
</div>
</div>
</div>
</header>
<section id="options">
<div class="bg-secondary-2 py-3">
<div class="container">
<h3>Options</h3>
</div>
</div>
<div class="container py-3">
<table class="table table-striped">
<thead class="thead-light">
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Default</th>
<th style="width: 40%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">username</code>
<span class="text-danger text-small text-italic">Required / Optional</span>
</td>
<td><em>String</em></td>
<td><code>null</code></td>
<td>Instagram username from where to retrieve the feed. Required if <span class="text-small text-italic">tag</span> is not defined.</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">tag</code>
<span class="text-danger text-small text-italic">Required / Optional</span>
</td>
<td><em>String</em></td>
<td><code>null</code></td>
<td>Instagram tag from where to retrieve the feed. Required if <span class="text-small text-italic">username</span> is not defined.</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">container</code>
<span class="text-danger text-small text-italic">Required / Optional</span>
</td>
<td><em>String</em></td>
<td><code>null</code></td>
<td>Selector where to place the feed. Required if callback is not defined.</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">callback</code>
<span class="text-danger text-small text-italic">Required / Optional</span>
</td>
<td><em>function(data)</em></td>
<td><code>null</code></td>
<td>Callback function with all the data fetched from instagram. Required if container is not defined.</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">display_profile</code>
</td>
<td><em>Boolean</em></td>
<td><code>true</code></td>
<td>Enables displaying the profile</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">display_biography</code>
</td>
<td><em>Boolean</em></td>
<td><code>true</code></td>
<td>Enables displaying the biography. Not compatible when loading a <span class="text-small text-italic">tag</span> feed</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">display_gallery</code>
</td>
<td><em>Boolean</em></td>
<td><code>true</code></td>
<td>Enables displaying the gallery</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">display_igtv</code>
</td>
<td><em>Boolean</em></td>
<td><code>false</code></td>
<td>Enables displaying the IGTV feed if available. Only for users</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">styling</code>
</td>
<td><em>Boolean</em></td>
<td><code>true</code></td>
<td>Enables default inline CSS styles</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">items</code>
</td>
<td><em>number [Int]</em></td>
<td><code>8</code></td>
<td>Number of items to display. Up to 12 for users, up to 72 for tags</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">items_per_row</code>
</td>
<td><em>number [Int]</em></td>
<td><code>4</code></td>
<td>Number of items that will be displayed for each row</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">lazy_load</code>
</td>
<td><em>Boolean</em></td>
<td><code>false</code></td>
<td>Enable lazy load of images using native web attribute loading="lazy" on img elements</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">margin</code>
</td>
<td><em>number [Float]</em></td>
<td><code>0.5</code></td>
<td>Margin (percentage) between items in gallery/igtv</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">image_size</code>
</td>
<td><em>number [Int]</em></td>
<td><code>640</code></td>
<td>Native resolution of the images that will be displayed in the gallery. Accepted values [150, 240, 320, 480, 640]. Does not apply to video previews.</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">host</code>
</td>
<td><em>String [url]</em></td>
<td><code>https://www.instagram.com/</code></td>
<td>URL where to fetch the data. Useful if instagram changes CORS policy</td>
</tr>
<tr>
<td class="d-flex flex-wrap">
<code class="text-bold flex-grow-1">on_error</code>
</td>
<td><em>function(error_description, error_code)</em></td>
<td><code>console.error</code></td>
<td><p class="mb-0">Function that will be triggered when an error ocurs. Error codes:</p>
<p class="mb-0"><span class="text-danger text-small text-italic">1</span>: No username nor tag defined</p>
<p class="mb-0"><span class="text-danger text-small text-italic">2</span>: No container nor callback defined</p>
<p class="mb-0"><span class="text-danger text-small text-italic">3</span>: Profile is age restricted</p>
<p class="mb-0"><span class="text-danger text-small text-italic">4</span>: Network banned</p>
<p class="mb-0"><span class="text-danger text-small text-italic">5</span>: Request error</p>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="examples">
<div class="bg-secondary-2 py-3">
<div class="container">
<h3>Examples</h3>
<ul class="pt-3 nav nav-tabs" id="tabExamples" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="example1-tab"
href="#example1" role="tab"
aria-controls="example1" aria-selected="true"
data-toggle="tab">Example 1</a>
</li>
<li class="nav-item">
<a class="nav-link" id="example2-tab"
href="#example2" role="tab"
aria-controls="example2" aria-selected="false"
data-toggle="tab">Example 2</a>
</li>
<li class="nav-item">
<a class="nav-link" id="example3-tab"
href="#example3" role="tab"
aria-controls="example3" aria-selected="false"
data-toggle="tab">Example 3</a>
</li>
<li class="nav-item">
<a class="nav-link" id="example4-tab"
href="#example4" role="tab"
aria-controls="example4" aria-selected="false"
data-toggle="tab">Example 4</a>
</li>
<li class="nav-item">
<a class="nav-link" id="example5-tab"
href="#example5" role="tab"
aria-controls="example5" aria-selected="false"
data-toggle="tab">Example 5</a>
</li>
<li class="nav-item">
<a class="nav-link" id="example6-tab"
href="#example6" role="tab"
aria-controls="example6" aria-selected="false"
data-toggle="tab">Example 6</a>
</li>
<li class="nav-item">
<a class="nav-link" id="example7-tab"
href="#example7" role="tab"
aria-controls="example7" aria-selected="false"
data-toggle="tab">Example 7</a>
</li>
</ul>
</div>
</div>
<div class="container pt-3">
<div class="tab-content" id="tabContentExamples">
<div class="tab-pane fade show active" id="example1"
role="tabpanel" aria-labelledby="example1-tab">
<h3>Example 1: Default feed styling</h3>
<p>Don't like it? Check other examples!</p>
<div id="instagram-feed1" class="instagram_feed"></div>
<div class="section_code py-3">
<div>Code:</div>
<pre><code class="language-html"><script src="jquery.instagramFeed.min.js"></script>
<script>
(function($){
$(window).on('load', function(){
$.instagramFeed({
'username': 'instagram',
'container': "#instagram-feed1",
'display_profile': true,
'display_biography': true,
'display_gallery': true,
'callback': null,
'styling': true,
'items': 8,
'items_per_row': 4,
'margin': 1,
'lazy_load': true,
'on_error': console.error
});
});
})(jQuery);
</script>
</code></pre>
</div>
</div>
<div class="tab-pane fade" id="example2"
role="tabpanel" aria-labelledby="example2-tab">
<h3>Example 2: Only want images?</h3>
<p>Disable <i>display_profile</i> and <i>display_biography</i></p>
<div id="instagram-feed2" class="instagram_feed"></div>
<div class="section_code py-3">
<div>Code:</div>
<pre><code class="language-html"><script src="jquery.instagramFeed.min.js"></script>
<script>
(function($){
$(window).on('load', function(){
$.instagramFeed({
'username': 'github',
'container': "#instagram-feed2",
<strong>'display_profile': false,
'display_biography': false,</strong>
'display_gallery': true,
'callback': null,
'styling': true,
'items': 8,
'items_per_row': 4,
'margin': 1
});
});
})(jQuery);
</script>
</code></pre>
</div>
</div>
<div class="tab-pane fade" id="example3"
role="tabpanel" aria-labelledby="example3-tab">
<h3>Example 3: Want to load more or change the display?</h3>
<p>Change <i>items</i>, <i>items_per_row</i> and <i>margin</i></p>
<div id="instagram-feed3" class="instagram_feed"></div>
<div class="section_code py-3">
<div>Code:</div>
<pre><code class="language-html"><script src="jquery.instagramFeed.min.js"></script>
<script>
(function($){
$(window).on('load', function(){
$.instagramFeed({
'username': 'zara',
'container': "#instagram-feed3",
'display_profile': false,
'display_biography': false,
'display_gallery': true,
'callback': null,
'styling': true,
<strong>'items': 12,
'items_per_row': 6,
'margin': 0.25</strong>
});
});
})(jQuery);
</script>
</code></pre>
</div>
</div>
<div class="tab-pane fade" id="example4"
role="tabpanel" aria-labelledby="example4-tab">
<h3>Example 4: Want to fetch a TAG?</h3>
<p>Use <i>tag</i> instead of <i>username</i>.</p>
<div id="instagram-feed4" class="instagram_feed"></div>
<div class="section_code py-3">
<div>Code:</div>
<pre><code class="language-html"><script src="jquery.instagramFeed.min.js"></script>
<script >
(function($){
$(window).on('load', function(){
$.instagramFeed({
<strong>'tag': 'paradise',</strong>
'container': "#instagram-feed4",
'display_profile': true,
'display_gallery': true,
'items': 100,
'items_per_row': 5,
'margin': 0.5
});
});
})(jQuery);
</script>
</code></pre>
</div>
</div>
<div class="tab-pane fade" id="example5"
role="tabpanel" aria-labelledby="example5-tab">
<h3>Example 5: Want to display IGTV?</h3>
<p>Enable <i>display_igtv</i>. <a href="https://help.instagram.com/381435875695118" target="_blank" rel="noopener">What is IGTV?</a></p>
<div id="instagram-feed5" class="instagram_feed"></div>
<div class="section_code py-3">
<div>Code:</div>
<pre><code class="language-html"><script src="jquery.instagramFeed.min.js"></script>
<script >
(function($){
$(window).on('load', function(){
$.instagramFeed({
'username': 'fcbarcelona',
'container': "#instagram-feed5",
'display_profile': false,
'display_biography': false,
'display_gallery': false,
<strong>'display_igtv': true,</strong>
'callback': null,
'styling': true,
'items': 8,
'items_per_row': 4,
'margin': 1
});
});
})(jQuery);
</script>
</code></pre>
</div>
</div>
<div class="tab-pane fade" id="example6"
role="tabpanel" aria-labelledby="example6-tab">
<h3>Example 6: Don't like our styles at all?</h3>
<p>Make your owns disabling <i>styling</i></p>
<div class="instagram_feed info">
<p>This is the html you will have (Note we have enabled profile and biography in this case).</p>
<pre><code class="language-html"><div class="<strong>instagram_profile</strong>">
<img class="<strong>instagram_profile_image</strong>" src="..." alt="Instagram profile pic">
<p class="<strong>instagram_username</strong>">@Instagram (<a href="...">@instagram</a>)</p>
<p class="<strong>instagram_biography</strong>">....</p>
</div>
<div class="<strong>instagram_gallery</strong>">
<a href="https://www.instagram.com/p/Bh-P3IoDxyB" rel="noopener" target="_blank">
<img src="..." alt="instagram instagram image 0" />
</a>
...
</div>
<div class="<strong>instagram_igtv</strong>">
<a href="https://www.instagram.com/p/Bh-P3IoDxyB" rel="noopener" target="_blank">
<img src="..." alt="instagram instagram image 0" />
</a>
...
</div>
</code></pre>
</div>
<div class="section_code py-3">
<div>Code:</div>
<pre><code class="language-html"><script src="jquery.instagramFeed.min.js"></script>
<script>
(function($){
$(window).on('load', function(){
$.instagramFeed({
'username': 'instagram',
'container': "#instagram-feed3",
'display_profile': true,
'display_biography': true,
'display_gallery': true,
'display_igtv': true,
'callback': null,
<strong>'styling': false,</strong>
'items': 12,
});
});
})(jQuery);
</script>
</code></pre>
</div>
</div>
<div class="tab-pane fade" id="example7"
role="tabpanel" aria-labelledby="example7-tab">
<h3>Example 7: Don't either like our template?</h3>
<p>Define a <i>callback</i> and do not define a <i>container</i></p>
<div class="instagram_feed info">
<p>This is the format you will get.</p>
<pre id="jsonHere"><code class="language-json">
</code></pre>
</div>
<div class="section_code py-3">
<div>Code:</div>
<pre><code class="language-html"><script type="text/javascript" src="jquery.instagramFeed.min.js"></script>
<script type="text/javascript">
(function($){
$(window).on('load', function(){
$.instagramFeed({
'username': 'instagram',
'callback': function(data){
$('#jsonHere').html(JSON.stringify(data, null, 2));
}
});
});
})(jQuery);
</script>
</code></pre>
</div>
</div>
</div>
</div>
</section>
<footer id="footer" class="bg-dark">
<div class="container text-center py-4">
<h3 class="text-white">Still not enough?</h3>
<a class="h3 mb-3 text-primary text-underline" target="_blank" rel="noopener"
href="https://github.com/jsanahuja/jquery.instagramFeed">
Open an issue or send a pull request!
</a>
</div>
<a href="#header" id="btn-top" class="bg-primary px-2 py-1" title="Go top">
<span class="text-white" aria-hidden="true">^</span>
</a>
</footer>
<script src="jquery.instagramFeed.min.js"></script>
<script>
(function($){
$(window).on('load', function(){
$.instagramFeed({
'username': 'instagram',
'container': "#instagram-feed1",
'display_profile': true,
'display_biography': true,
'display_gallery': true,
'callback': null,
'styling': true,
'items': 8,
'items_per_row': 4,
'margin': 1,
'lazy_load': true,
'on_error': console.error
});
$.instagramFeed({
'username': 'github',
'container': "#instagram-feed2",
'display_profile': false,
'display_biography': false,
'display_gallery': true,
'callback': null,
'styling': true,
'items': 8,
'items_per_row': 4,
'margin': 1
});
$.instagramFeed({
'username': 'zara',
'container': "#instagram-feed3",
'display_profile': false,
'display_biography': false,
'display_gallery': true,
'callback': null,
'styling': true,
'items': 12,
'items_per_row': 6,
'margin': 0.25
});
$.instagramFeed({
'tag': 'paradise',
'container': "#instagram-feed4",
'display_profile': true,
'display_gallery': true,
'items': 100,
'items_per_row': 5,
'margin': 0.5
});
$.instagramFeed({
'username': 'fcbarcelona',
'container': "#instagram-feed5",
'display_profile': false,
'display_biography': false,
'display_gallery': false,
'display_igtv': true,
'callback': null,
'styling': true,
'items': 8,
'items_per_row': 4,
'margin': 1
});
//example 7
$.instagramFeed({
'username': 'instagram',
'callback': function(data){
$('#jsonHere').html(JSON.stringify(data, null, 2));
}
});
// Show back to top button if distance from top > 0
$(window).scroll(function(){
var viewportTop = $(window).scrollTop() + $(window).height();
if($(window).scrollTop() > 10){
$('#btn-top').addClass('d-block');
$('#btn-top').removeClass('d-none');
}else{
$('#btn-top').addClass('d-none');
$('#btn-top').removeClass('d-block');
}
});
});
})(jQuery);
</script>
</body>
</html>