Css / HTML5 - Need help getting a youtube popup to appear using fancybox2

vrsf

New Member
I've been working on getting a youtube video to play as a pop-over in HTML5 using "fancybox". Only I cannot get it to pop-up! instead it always seems to open the page itself, which is completely against the point. I could use some advice on how to fix this, can you help? I have looked on stack-overflow but did not find a clear answer to this use case.\[code\] <!DOCTYPE HTML><html> <head> <!--fancy box--> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <!-- /fancy box--> <!--fancy box--> <script type="text/javascript" src="http://stackoverflow.com/questions/15635127/fancybox/jquery.fancybox.pack.js"></script> <link rel="stylesheet" href="http://stackoverflow.com/questions/15635127/fancybox/jquery.fancybox.css" type="text/css" media="screen" /> <script> $(document).ready(function() { /* This is basic - uses default settings */ $("a#single_image").fancybox(); /* Using custom settings */ $("a#inline").fancybox({ 'hideOnContentClick': true }); /* Apply fancybox to multiple items */ $("a.group").fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 600, 'speedOut' : 200, 'overlayShow' : false }); }); </script> <!-- /fancy box--> </head> <body> <a class="fancybox-media" href="http://www.youtube.com/watch?v=opj24KnzrWo&autoplay=1">Youtube</a><br> <a class="iframe" href="http://www.youtube.com/watch?v=opj24KnzrWo&autoplay=1">This goes to iframe</a><br > <a class="iframe" href="http://www.example.com">This goes to iframe</a><br> <a class="various iframe" href="http://www.youtube.com/embed/L9szn1QQfas?autoplay=1">Youtube (iframe)</a> </body></html>\[/code\]
 
Back
Top