So... I've already read Example #4 here:
http://fancybox.net/blog
and my problem is similar to the one here:
http://groups.google.com/group/fancybox/browse_thread/thread/b8b660af196e412e/f3cb16d4242cf25f?lnk=gst&q=video#f3cb16d4242cf25f
But I still can't get the youtube video to display in FancyBox. When I
click on the link, it just opens up the video in a new tab. I've been
banging my head against the wall in frustration all afternoon. I just
don't see what the issue is.
I also have a secondary question... why is the type 'swf'? Doesn't
that correspond to flash? YouTube files are in the flv format. Could
that be the problem? There was another post that suggested changing
swf to iframe in order to let the browser decide, but the code for
that was different than the example #4 code and what I have pasted
below.
Any help would be appreciated.
My code is:
[code]
<script type='text/javascript' src='js/
jquery.fancybox-1.3.4.pack.js'></script>
<script type="text/javascript">
$(document).ready(function() {
$("#watchvid").click(function() {
$.fancybox({
'padding' : 0,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'title' : this.title,
'width' : 560,
'height' : 315,
'href' : this.href.replace(new RegExp("watch\\?v=",
"i"), 'v/'),
'type' : 'swf',
'swf' : {
'wmode' : 'transparent',
'allowfullscreen' : 'true'
}
});
return false;
});
});
</script>
<a id="watchvid" href="
http://www.youtube.com/watch?
v=071KqJu7WVo&feature=player_embedded" title="How it works">Learn
more</a>
[/code]