Website: http://blieque.comli.com/motion
Before I start, I know that there are many alternatives to Lightbox2 (Lokesh Dhakar's) for showing the video, but I want to avoid using three different JavaScript things already using MooTools and JQuery, as I want the HTTP requests to be minimal as well disk usage.
Like everything, Lightbox2 does not support video, full stop. However, I noticed that JavaScript essentially took the contents of the attribute a hrefand put it in the attribute img srcwhen the box was opened. As far as I can see, changing this imgto iframe(done) and setting the anchor tag hrefto youtube.com/embed/*video-id*should generate a iframecontaining YouTube video (replacing watch?id=with embed/represents a full-screen version of the video.
Then I also added JavaScript for the width, height and frameborder attributes on top of the standard one class="lb-image". Now that the page is loaded and the called Lightbox creates an empty window. If you check the code, you will see all the attributes, but the page in the frame frame is not loaded, just creating an empty tag headand body.
I'm just wondering if there was a server problem or a problem with the code, and if so, how to fix it. If there is a way to make it work?
thank
Note. I DO NOT use Drupal, so the option is lightvideonot available.
source
share