Posted in Quick Modals
3207
12:02 am, December 13, 2022
 

Fancybox Quick Video Modal Popup Code Inline

have you ever needed to add a quick video modal using fancybox. Probably not, but if you do, here is the code.

HTML

<h3>Youtube Link Example</h3>
  </a>
<a data-fancybox href="https://www.youtube.com/watch?v=PoXiYTlCh1M&amp;autoplay=1&amp;rel=0&amp;controls=0&amp;showinfo=0">
        <img class="card-img-top img-fluid" src="http://img.youtube.com/vi/PoXiYTlCh1M/mqdefault.jpg" />
      </a>

<h3>Vimeo Example</h3>
<a data-fancybox href="https://vimeo.com/95673122?color=ff0000">
    <img class="card-img-top img-fluid" src="http://img.youtube.com/vi/AC1cREPIw_o/hqdefault.jpg" />
</a>

Scripts

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js"></script>

Youtube Link Example

Vimeo Example

External Link for Fancybox Quick Video Modal Popup Code Inline

View Statistics
This Week
35
This Month
239
This Year
639

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Items in Quick Modals
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
"Let us prepare our minds as if we'd come to the very end of life. Let us postpone nothing. Let us balance life's books each day ... The one who puts the finishing touches on their life each day is never short of time."
Seneca
Random CSS Property

place-items

The CSS place-items shorthand property allows you to align items along both the block and inline directions at once (i.e. the align-items and justify-items properties) in a relevant layout system such as Grid or Flexbox. If the second value is not set, the first value is also used for it.
place-items css reference