Posted in Quick Modals
3212
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
40
This Month
244
This Year
644

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
I believe that in order to better your knowledge base, it takes a lot of failing in order to succeed. I don't consider anything a failure as long as you get back up and you learn from your own mistakes.
Unknown
Random CSS Property

src

The src CSS descriptor of the @font-face rule specifies the resource containing font data. It is required for the @font-face rule to be valid.
src (@font-face) css reference