/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).ready(function(){ $('a[href*="youtube.com/watch"]').click(function() { $.fancybox({ 'padding' : 0, 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'title' : this.title, 'width' : 680, 'height' : 495, 'href' : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'), 'type' : 'swf', 'swf' : { 'wmode': 'transparent', 'allowfullscreen': 'true' } }); return false; }); });
URL: http://www.dropthenerd.com/how-to-show-youtube-videos-in-a-lightbox/