Videobox: Lightbox for videos
Videobox: Lightbox for videos
Introduction
Videobox is a 6kb script, which shows your videos in the page with an overlay. It was inspired from Lightbox.v2 and uses some of the Slimbox´s code. It´s written for the wonderful mootools library. And used swfobject to embed flash.
Usage
Firstly, you should include 3 javascript files to your page. You can change the path, if you upload it to somewhere else. You can paste the code below in your head tag.
<script type="text/javascript" src="js/mootools.js"></script> <script type="text/javascript" src="js/swfobject.js"></script> <script type="text/javascript" src="js/videobox.js"></script>
And you must include the css file(for the styles).
<link rel="stylesheet" href="css/videobox.css" type="text/css" media="screen" />
And, here is the thing:
<a href="http://www.youtube.com/watch?v=uhi5x7V3WXE" rel="vidbox" title="caption">our video</a>
Add the rel="vidbox" to your video page´s link to show video links in Videobox, and add title="my caption" to add caption to a box.
Features
You can change the dimensions of the video by adding rel="vidbox width height".
<a href="http://www.youtube.com/watch?v=VhtIydTmOVU" rel="vidbox 800 600" title="caption">our video1</a>
You can also start your videos with javascript.
Videobox.open("your video page url","your caption","vidbox widht height");

You write your thoughts
Please login to post comments here from the right corner.
20 January 2010 Wednesday




