SqueezeBox - Expandable Lightbox (v1.1)
SqueezeBox is an unobtrusive LightBox inspired overlay, for modal boxed content on your site.
It’s a snap to show images but just as easy to use HTML elements, Ajax requests, iFrames, SWF movies and more.
Showcase “Youtube Flash”
Inject flash content from Youtube.
The Action Happens Here
JavaScript & MooTools
SqueezeBox.parsers.swf = function(preset) { return (preset || this.url.test(/\.swf/)) ? this.url : false; }; SqueezeBox.handlers.swf = function(url) { var size = this.options.size; return new Swiff(url, { id: 'sbox-swf', width: size.x, height: size.y }); }; window.addEvent('domready', function() { /** * That CSS selector will find all <a> elements with the * class boxed. * * The second argument sets additional options */ SqueezeBox.assign($$('a.boxed'), { parse: 'rel' }); });
XHTML Markup
<a href="http://www.youtube.com/watch?v=QCVxQ_3Ejkg" class="boxed" rel="{url:'http://www.youtube.com/v/QCVxQ_3Ejkg',handler:'swf',size:{x:425,y:350}}">Those lucky bastards!</a>
CSS Stylesheet
#sbox-window .sbox-content-swf { overflow: hidden; }
This example and the accompanying sources/assets are © 2008-2009 by Harald Kirschner and available under The MIT License. For debugging and profiling the scripts and their markup download Firefox and use addons like Firebug and Web Developer Toolbar.
349 Comments
Please use the support forums for discussing the project, asking questions or posting bug-fixes!