fancybox youtube showing video links in a lightbox

do people still use lightboxes, it seems yes in some cases. ;)

if you feel the urge to use lightboxes and need to link to some youtube videos this is how you can do it.

you will need jquery and fancybox and a youtube video link for this to work

<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>

I found this example somewhere, cant remember where that adds the fancybox code to any link with the class video

<script>jQuery(document).ready(function() {

	    type: "iframe"


Add a link to the video, e.g:

here is a test link

Click it to see if it works...

View Demo

Other Items in js
Page Views

This page has been viewed 413 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.


Random Quote
1. Show your work to the world instead of keeping in your head💆. 2. Do the work consistently👌 3. Respect your work🥰 4. Don't postpone your work 5. Make mistakes 🔥🔥🔥