Posted in Quick Modals
3243
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
51
This Month
116
This Year
675

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

print-color-adjust

The print-color-adjust CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device.
color-adjust css reference