Photo script?

Hello SitePointers,
More and more I see websites (including sitepoint attachments), that show the photo expand to a larger image on the webpage, while the back of the page is darkened out. How is this done? Is it a script that enables this?
I would like to be able to do this on my website which is made with Flash CS3.
Thanks for your help.

I particularly like what happens with CSS off. Very elegant. :slight_smile:

Oooh, ah, that’s beautiful work, Alex. Thanks for posting it!

You shouldn’t use Flash for something that can be done unobtrusively, I produced a pure CSS lightbox in an article which might be of use:

http://downloads.sixrevisions.com/css-light-box/source.html

No problem, I got inspired to produce it as a result of all the scripting dependency going on (as I was sure with CSS3 it could be accomplished), it has a bit of unobtrusive scripting in the background to help IE do it’s job (replicating CSS3 :target) but for every other browser it’ll work and do the job as well as scripting could :stuck_out_tongue:

I’ve gathered quite a few jQuery gallery scripts that degrade nicely. To some extent I can fix up those that don’t with overflow: auto type fixes (such as carousels). Ideally I’d know enough about JS/jQuery to fix the others, too, but until then I just put them to one side.

Yea, it’s much less obtrusive than conventional jQuery equivalents that’ll cease to work if scripting is disabled (I’m pretty happy with it anyway). :slight_smile:

It’s a JavaScript effect, usually provided by one or another “library”, like Prototype or jQuery.

These are some pupular ones:

Lightbox:
http://www.huddletogether.com/projects/lightbox2/

Slimbox

FancyBox
http://fancybox.net/

Don’t know about combining this with flash, though. I wouldn’t build a website with Flash, myself.