You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/index.html
+54-5Lines changed: 54 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -457,6 +457,18 @@ <h3 id="images">Images</h3>
457
457
<ahref="http://codepen.io/fancyapps/pen/wgBrXd?editors=1000" target="_blank">View demo on CodePen</a>
458
458
</p>
459
459
460
+
<p>
461
+
fancyBox supports "scrset" so I can display different images based on viewport width. You can use this to improve download times for mobile users and over time save bandwidth.
If you have not disabled iframe preloading (using an "preload" option), then the script will atempt to
593
+
calculate content dimensions and will adjust width/height of iframe to fit with content in it.
594
+
Keep in mind, that due to <ahref="https://en.wikipedia.org/wiki/Same-origin_policy" target="_blank">same origin policy</a>,
595
+
there are some limitations.
596
+
</p>
552
597
553
598
<!--
554
599
@@ -599,8 +644,12 @@ <h3>Video dimensions</h3>
599
644
600
645
<p>
601
646
Obviously, you can choose any size you like, any combination with <code>min</code>/<code>max</code> values.
647
+
<br/>
648
+
Aspect ratio lock for videos is not implemented yet, but if you wish, <ahref="http://codepen.io/fancyapps/pen/dNzaQq?editors=1010" target="_blank">you can use this snippet</a>.
602
649
</p>
603
650
651
+
652
+
604
653
<h3>Video parameters</h3>
605
654
606
655
<p>
@@ -1191,13 +1240,13 @@ <h3>How to customize caption</h3>
1191
1240
1192
1241
1193
1242
<p>
1194
-
Example of using different source for caption:
1243
+
Inside <code>caption</code> method, <code>this</code> refers to the clicked element. Example of using different source for caption:
1195
1244
</p>
1196
1245
1197
1246
<pre><code>$( '[data-fancybox]' ).fancybox({
1198
-
caption : function( instance, item ) {
1199
-
return $(this).find('figcaption').html();
1200
-
}
1247
+
caption : function( instance, item ) {
1248
+
return $(this).find('figcaption').html();
1249
+
}
1201
1250
});</code></pre>
1202
1251
<pclass="demo">
1203
1252
<ahref="https://codepen.io/fancyapps/pen/bgEQXo?editors=1010" target="_blank">View demo on CodePen</a>
0 commit comments