Posted in Quick Modals
3259
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
132
This Year
691

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
Even if you fall on your face, you're still moving forward.
Victor Kiam
Random CSS Property

@media

The @media CSS at-rule can be used to apply part of a style sheet based on the result of one or more media queries. With it, you specify a media query and a block of CSS to apply to the document if and only if the media query matches the device on which the content is being used.
@media css reference