fancybox+youtube blank page

Go To StackoverFlow.com

0

I know there's a lot of questions about this but I've been struggling with this for the past 3 days and didn't managed to solve my problem. I have Fancybox 2.0 on an image gallery and it works fine. In another page there's a video gallery and even though the window pops up perfectly it doesn't show the video but a blank page.

Here's the code for the jquery:

<link rel="stylesheet" type="text/css" media="screen" href="jquery.fancybox.css" />

<script type="text/javascript" language="javascript" src="jquery.js"></script>
<script type="text/javascript" language="javascript" src="jquery.fancybox.js"></script>



<script type="text/javascript">
$(document).ready(function() {
    $(".various").fancybox({
    maxWidth    : 800,
    maxHeight   : 600,
    fitToView   : false,
    width       : '70%',
    height      : '70%',
    autoSize    : false,
    closeClick  : false,
    openEffect  : 'none',
    closeEffect : 'none'
    });
});

</script>

<script type="text/javascript" language="javascript">

$(document).ready(function(){
$('.fancybox').fancybox();
});
</script>

And here's how I'm referring to it:

<a class="various fancybox.iframe" href="<src="http://www.youtube.com/embed/WQNQU_EQy6I?    rel=0" title="I'm floating"><img src="photos/floatings.png"></a>

Any help would be much, much appreciated.

2012-04-04 03:12
by felipe


0

First of all, your href on the link has

<src="

as in

href="<src="http://www.youtube.com/embed/WQNQU_EQy6I?    rel=0"

then to get it to work, remove

$('.fancybox').fancybox();

lastly, lol, please give a sample video like 'ducks on the lake', that video was a little spooky :)

2012-04-04 03:33
by Valamas
remove $('.fancybox').fancybox(); : Most likely this is the script he uses for his image gallery as mentioned by the OP so I wouldn't advice to remove it (scripts for iframes might be different from scripts for images - JFK 2012-04-04 05:27
hahahaha spooky? Thanks for your reply! I managed to make it work: changed this 'href="felipe 2012-04-04 11:08
Ads