So I’m trying to embed a Youtube Video in a Fancybox pop-up window. However, it does not load, only a blank pop-up window appears.
I have applied the class .fancyYoutube to the link, and have linked my page link to the jquery.
I have a demo site up now for testing purposes which you can find here:
http://stevepolitodesign.comlu.com/
The piece that is not working is located in the “portfolio” section and is at the bottom left.
Here is the HTML for the affected code:
<div class="myWork">
<a href="http://youtu.be/aXC4BORr3jI" class="fancyYoutube">
<p class="caption">
<span class="bold">category:</span> <br />
motion graphics <br /><br />
<span class="bold">client:</span> <br />
camp harrington<br />
</p>
<img src="images/thumbnails_16.jpg" width="130" height="130" alt="Camp Harrington Promotional Video" class="thumbnail"/>
</a>
</div>
Here is the affected jquery:
$("a.fancyYoutube").fancybox({
'transitionIn' : 'elastic',
'padding' : 0,
'autoScale' : false,
'transitionOut' : 'fade',
'width' : 680,
'height' : 495,
'type' : 'swf'
});
actually the
htmlin your site isif you want to keep using that
htmlthen try this script:Note that the script will work for the current html and fancybox v1.3.4 only. If you change the html (or the fancybox version) then you may need to tweak the script