Cabel.Cabel.

FancyZoom 1.1

Update: Version 1.1 released 2/8/08. Good bug fixes + Opera compatibility!

...so I fought back the charging Guanaco, immediately hopped on my paraglider, and basically caught the first flight out of Chile — but not without dealing with some cantankerous customs inspectors while drinking a cool glass of chicha. Really sorry it took so long! But hey, two years later, it's finally done!

Smooth Javascript Image Zooming For Your Web Pages

This much-requested chunk of Javascript to zoom images inline, originally written for this blog but later rolled out to the Panic website and used for screenshots, is now polished up, bug-fixed, available for you to use on your website!

Designed to view full-size photos and images inline without requiring a separate web page load, FancyZoom's raison d’être (French for "raisin-determination") is providing a smooth, clean, truly Mac-like effect, almost like it's a function of Safari itself. Since I originally wrote this script, there are now a lot of image zoomers to choose from (including a similar effect now on Apple's own site!), such as the popular (and inspiring) Lightbox. So you might be asking: "Cabel, why use FancyZoom?" Well, here's why!
  • Focused on the smoothest, most polished zooming animation possible
  • Automatically scales images from any image link, with no HTML changes
  • Preloads full-size images in the background on link mouseover
  • No resource-heavy Javascript libraries — 100% coded from scratch to zoom
  • Draws a nice drop shadow under the full-size image to offset it from the page
  • Uses Safari 3's "box-shadow" feature to draw the drop shadow natively, no images required
  • Requires only two new lines of code in your HTML
  • Tested and works with Safari, Firefox, IE7, and IE6. (Looks better in modern browsers.)

Since FancyZoom is so easy to add to a web page, I encourage you to give it a try!

Instructions

Installing FancyZoom on your web pages should be dead simple.

1 Download the FancyZoom package, right here:


2 Using Transmit (or your favorite FTP client), upload the two folders inside the package to the root of your webserver.

3Add the following two lines of code to the <head> section at the top of your web page(s):

<script src="/js-global/FancyZoom.js" type="text/javascript"></script>
<script src="/js-global/FancyZoomHTML.js" type="text/javascript"></script>

4Add onload="setupZoom()" inside your page's existing <body> tag. For example:

<body id="whatever" [...] onload="setupZoom()">

5Whoah. You're done! The rest is automatic — links to images in your page will automatically zoom the images. For example:

<a href="image.jpg"><img src="image-thumbnail.jpg" /></a> will zoom up image.jpg when clicked.

Additional Details

There are a few extra notes that you might find useful.
Want to add a caption? Add a title tag in your href. That's it!

FancyZoom will use the size of the first element in the href to determine the initial size and location of the zoom.

FancyZoom works best if you wrap your href around a thumbnail, but also works from text-only links to images.

FancyZoom will attach itself to any jpg, gif, png, bmp, or tiff link in your page.

If you're a Javascript hacker, FancyZoom's flexible fadeIn and fadeOut functions can be used for all sorts of fun stuff.

If you explicitly don't want an image to zoom, add a rel="nozoom" tag to your href.

Example

It's both an example, and some random pictures from Macworld Expo 2008!

Release Notes

Version 1.1 released 2/8/2008.
  • Improved Opera compatibility
  • Fixed an issue that would cause crazy infinite zooming
  • Improves caption behavior in certain situations
  • Now returns any alt-clicks and command-clicks back to the browser, for standard behavior (open in new tab, etc.)

License

FancyZoom is totally free for your non-commercial website.

In a bit of an experiment: if your website is commercial (i.e. makes you money), you can license FancyZoom for $39 per site, a one-time fee. Instantly add nice image zooming to your site. Click here to instantly and securely buy a license.

Enjoy

I hope you and your websites enjoy FancyZoom. If you make any cool changes or improvements, let me know! And if you have awesome feedback, or find weird bugs, drop word in the comments.

PS: Yes, you can even hold shift when you click an image. The Apple tradition continues!

426 Comments:

«Oldest ‹Older 1 – 200 of 426 Newer› Newest»
Sweet Jesus, that's great.

I'd prefer a white border around the image to offset it further, but that's not a major thing.
Blogger Neven Mrgan 2/07/2008 1:42 PM  
In IE6 the .png's that are used for the background aren't transparent, but that's pretty minor and unfortunately needs a hack.
I'm sure the faithful readers of this blog are using something a little more modern then that though.
Blogger bretto 2/07/2008 1:45 PM  
Very nifty!
Blogger Sean Harding 2/07/2008 1:46 PM  
It's worth mentioning that it works well on MobileSafari as well.
Anonymous Jason 2/07/2008 1:46 PM  
I think I might like a border as well...but still, very nice.

And I saw that same kid with the mullet at MacWorld (photo #8). Did anyone stop him to ask him what the hell he was thinking? (Unless it was a joke, in which case, I salute him.)
Anonymous GregM 2/07/2008 1:48 PM  
Sean: I should have mentioned that older browser can get a less-than-ultimate experience. :) Additionally, only Safari (so far) will take advantage of the built in box-shadow feature. I hope more browsers add that in the future!
Blogger Cabel 2/07/2008 1:49 PM  
Congrats on the release! Looks good. The big news for me though is that the Cartoon Art Museum has Mary Blair art. Will have to check it out next WWDC.
Blogger Manton 2/07/2008 1:56 PM  
Thanks, Cabel. You da MAN.
Anonymous tangoravi 2/07/2008 2:02 PM  
Wow, Cabel, that's really beautiful. I love it.
Anonymous Alex 2/07/2008 2:14 PM  
Cool as always. Thx, Cabel!
OpenID planetexpress69 2/07/2008 2:21 PM  
yikes. slooooooooooow.
Anonymous sirtimbly 2/07/2008 2:22 PM  
oh neat. it looks horrible in IE6 so don't expect anyone to use it.
Anonymous Anonymous 2/07/2008 2:23 PM  
Yeah, yeah.. typical Cabel genius. *yawn* ;-P

More importantly... do you actually paraglide? I highly recommend it and you're in something of a mecca for it with many, many sites on the coast, in the gorge and up Tuttle valley-way. I highly recommend it. :-)
Anonymous Parker 2/07/2008 2:23 PM  
Cabel, how would you define "commercial"? Would you consider a site with a few ads to be "commercial"?

Some people say yes, some say no, so I'd love to know your opinion. :)
Anonymous Anonymous 2/07/2008 2:25 PM  
Oh thank you! I've been waiting for this for a long time!
Anonymous Anonymous 2/07/2008 2:38 PM  
Actually Firefox 3b2 (the browser I'm using) also shows the shadows correctly. Yay!
Blogger Martti 2/07/2008 2:49 PM  
Please don't go paragliding.

Your Father
Anonymous Anonymous 2/07/2008 2:51 PM  
That's great. Thanks for sharing!
Anonymous ssp 2/07/2008 2:54 PM  
This ROCKS Cabel! Not only is it great looking, but the implementation on a website could not get any easier!

THANK YOU!!!
Blogger Kevin Hoctor 2/07/2008 3:00 PM  
Thanks so much Cabel. When I first stumbled onto your blog I was fascinated by the fancy zoom. Now I've incorporated into our family blog, easy as pie!

http://avaelliot.com
Blogger Ava's Dad 2/07/2008 3:01 PM  
Thank you, thank you, thank you!! I spent hours last night trying to get Adobe Spry to do something half as good as this!

I'm happy to pay for such a great feature and to make my site look better! I do hope others support you as well.
Anonymous Anonymous 2/07/2008 3:30 PM  
This is great Cabel, but just a thought... how about building a license to use this in the next update to Coda?!
Anonymous Anonymous 2/07/2008 3:33 PM  
Awesome! Will be sure porting this to my blog.
OpenID NeverPanic 2/07/2008 3:33 PM  
Fancyzoom is great. Does anybody know whether it would be possible to add a slight darkened background like a traditional javascipt lightbox behind the popup ? i think that would make this perfect. thanks
Anonymous Anonymous 2/07/2008 3:50 PM  
I'm in love man... Good work. Like much better than lightbox.
Blogger Josh McKenney 2/07/2008 4:15 PM  
nice. Even works on the iPhone, although slow.
Blogger Corey 2/07/2008 4:17 PM  
too bad it does not work properly with Opera.
Anonymous Anonymous 2/07/2008 4:34 PM  
Cha-am express was also owned by the Jollibee corporation.
Anonymous Anonymous 2/07/2008 4:40 PM  
An addition that might be interesting for either Cable or someone else to consider:

Detect the browser, and if it's an iPhone/iPod touch, provide a customized version which:

1. Works faster (by dropping frames)
2. gives a bigger loading spinner
3. scales and places the image so it takes up with width/height of the iPhone screen
4. provides a bigger Close button
Blogger Neven Mrgan 2/07/2008 4:50 PM  
Hey Neven: You bring up a great question.

I was once thinking that, actually, inline image zooming doesn't make much sense on the iPhone -- that a full page load to the image, traditional-style, is much better, because it provides easier panning/zooming of the image to see it up close, and you have an easy back button to get back to where you were. My original plan was to detect the iPhone and turn off the zooming entirely.

If you think about it, "filling the screen", which makes a lot of sense, is a challenge on the iPhone, because of the scale factor. If your image is small, and you are zoomed out so that you see the whole page, filling the screen with your image would mean stretching the image far beyond its original dimensions, which could look terrible.

It's super tricky.. still thinking. ;)
Blogger Cabel 2/07/2008 4:54 PM  
Seems to work on Opera 9.5 beta (Mac) except for the fact the image is placed way down on the page so you have to scroll down to see it.
Anonymous Anonymous 2/07/2008 5:00 PM  
I too would like to know exactly how you define commercial. I run a few personal sites/blogs on which I show ads—do those count? I I might also try to sell personal music in a few months on one of them, so I assume that one almost surely will.

Any chance you could elaborate?
OpenID David Chartier 2/07/2008 5:04 PM  
David: Good question. Let's think about it out loud! :)

What about "commercial" meaning "if your site makes you money?". In that situation, $39 should be pretty reasonable, and could, in an oblique way, help your site make more money through a better user experience?

Thoughts?
Blogger Cabel 2/07/2008 5:12 PM  
My big gripe with this (and all the other image-zoom hacks) is that if you cmd-click a link, it doesn't open the image in a separate tab (though strangely, middle-click does still work). Generally I hate Javascripty things that try to redefine the browser's semantics anyway, though.
Blogger fluffy 2/07/2008 5:19 PM  
Fluffy: You know, I think I might be able to adjust it so cmd-click still works! I'll take that as a feature request for 1.1. ;)
Blogger Cabel 2/07/2008 5:21 PM  
Awesome! I was floored the first time I saw this on your site. I'll probably end up rolling my own with more of a border to separate the image from the content, but it's neat to see the code.

A few things I've noticed:
The loading spinner either doesn't animate, or animates very sporadically (it'll move a position or two, then stop for a second or so, then repeat).
Sometimes, when an image hasn't completely loaded before zooming starts, it will zoom using the previously loaded image, and then switch them once zooming completes, which can be a little jarring. (I'm on Camino 1.5, which uses Firefox's Gecko engine).

Other than that, this is a great image displayer. I like it a lot more than light box.
Anonymous DLP 2/07/2008 5:27 PM  
That mullet picture is truly epic. I'd love a caption so I could hear Cabel's thoughts on it.
Anonymous Anonymous 2/07/2008 5:35 PM  
I'm completely blown away. Thank you. Again and again.
Blogger mistersquid 2/07/2008 5:51 PM  
"That mullet picture is truly epic. I'd love a caption so I could hear Cabel's thoughts on it."

Actually, I think it's wholly appropriate that it is noted without comment.
Anonymous Stephen Coles 2/07/2008 5:56 PM  
That's an awesome piece of code there. Thanks for sharing your talents with us!

Oh and... the image with the slogan "Bone your Life"? WTF?! (in terms of the somewhat distasteful euphemism that is "bone", at least here in the land of Oz)
Blogger Xander 2/07/2008 6:02 PM  
Opera... lololololo
Anonymous uniuni 2/07/2008 6:20 PM  
Cabel, I've been waiting for this! I even considered appropriating it from your blog for the blog I'm coding contrary to your *express instructions*. I'm glad I waited.

You're a champ. Thanks.
Blogger Nick Valvo 2/07/2008 6:24 PM  
This is lovely. I've always liked your screenshot "zooms" -- thanks for sharing.
Anonymous Ben D. 2/07/2008 6:46 PM  
Very nice! I only recently started using Lightbox, but FancyZoom is a cleaner, more elegant solution.
Anonymous Jon 2/07/2008 7:01 PM  
Oh boy, remember the countless emails from me? Garrett? Yah, you remember. You are totally getting the $39.00 without me using it on a commercial site.

Thanks so much!
Blogger Garrett 2/07/2008 7:13 PM  
Cabel: Your definition is simple, straightforward, and agreeable. Thanks!
OpenID David Chartier 2/07/2008 8:11 PM  
Totally love the slow-motion shift-click. Just like OS X!
Anonymous Anonymous 2/07/2008 10:01 PM  
Our site has AdSense, which brings in income. On our site is a blog. We hire freelance writers to write the blog. We pay them more than we make from the AdSense income attributable to the blog. (We do this deliberately in an attempt to develop the blog into a profit center in the future.)

Is our blog commercial? :-)

It's not that I'm so cheap, but rather that I'm skeptical that we would end up using this after the gimmick factor wears off. Most software has a trial period, so you can diddle with it and if you stop using it before the period is over, you don't pay for it. For instance, we licensed Transmit (useful) and didn't license Coda (nice solution for some people perhaps, but we were satisfied with our old workflow).

Perhaps a built-in one month expiration, not something that couldn't be gotten around so much as something so people who install it and decide they don't need it don't have to manually go back into their blog posts and rip it back out again.
Anonymous Anonymous 2/07/2008 10:11 PM  
Incredible work, thank you.

Might it be possible to incorporate the way in which Lightbox handles sets, with Back and Forward arrows which appear on the enlarged photos when you hover over the left or right sides?

Some users like to pick and chose which thumbs they want to enlarge but others like to zip through sets using those arrows - they save a lot of mousing back and forth.

I think it would be a genuinely useful feature but would it add too much cruft to the code?
Blogger donnacha 2/07/2008 10:40 PM  
Anonymous: Yes, I'd say your blog is commercial — regardless of profitability. ;)

Sadly, there's no reasonable way to put a "trial period" on a piece Javascript, nor would I really want to. You can see it here, in action, and review the code yourself. Most importantly, assuming your blog runs on templates, and it should, "ripping out" FancyZoom simply means removing two lines of code from your template and re-publishing. Extremely easy.

Ultimately, if you're at all hesitant about using it in the long term etc., this effect is probably not be a great fit for your site — either you love it or you don't! :) That said, we've used it for years on the Panic site, and here on my blog, for many years, and I think it's a great way to view images.
Blogger Cabel 2/07/2008 10:42 PM  
donnacha: It's absolutely something I want to add in the future. At this rate, version 2.0 might land in 2016, but I've got some ideas and I'll keep it on my to-do list!
Blogger Cabel 2/07/2008 10:44 PM  
Wow, speedy response, thanks Caleb :)

I have a couple of thoughts on the pricing issue:

Licensing a piece of Javascript is tricky, especially on a per-site basis. As you are selling something that makes a site look better, more special, I would draw an analogy with the sale of website templates and blog themes. Part of what you pay for is that the price itself acts as a barrier against saturation, keeping the look somewhat exclusive.

In this case, however, the vast majority of sites on the Web, being non-commercial, can use FZ for free. The guys who do pay are left with something that, yes, does its job but is no longer "special", because every Tom, Dick and Harry is using it for free.

In short, paying for something visual should entail some exclusivity - people's eyeballs don't care if a site is commercial or not.

Also, charging on a per-site basis is messy. A good piece of Javascript should become part of a Web designers toolbox - he shouldn't have to stop creating in order to figure out what the licensing issues are. Sure, a big app like a forum justifies that but not a piece of Javascript, no matter how beautifully crafted!

It would also be a nightmare for you to police, or to handle support issues like customers wanting to transfer their license from a defunct website to a new one - happens all the time. It would make much more sense to sell it as a developer's license, unlimited uses by one developer, non-transferable.

I guess you could sell a single-use version for people who definitely only want it for one, but the vast majority of use just want something we can splash onto the canvas whenever we want.

Even better, forget the commercial/non-commercial distinction and, as someone suggested earlier, include it with Coda instead of whatever discount you're running at the moment. I'm one of the people who used Coda heavily for the demo period, liked it but didn't see enough advantages (yet) over Textmate + CSSedit to justify spending a hundred bucks. This feature, however, would make it worthwhile - I would buy it tonight and become a Coda evangelist if I got to put FZ into my toolbox.
Blogger donnacha 2/07/2008 11:36 PM  
Pretty good work! Love the effect.
Blogger LEGIT freebies dude! 2/08/2008 12:02 AM  
donnacha: The commercial use license is a total experiment with no expectations. I'll play it by ear and adjust as necessary. As an aside, I don't feel the effect's value is being "special" or "exclusive" — the value is that it can make websites work better, and I want everyone to use it as widely as possible. Best case scenario: the user thinks the browser is zooming the image, not the web page!

The only idea behind "commercial licensing" is to help recoup and fund future development of this script by getting something back from the people who make money off of their websites (and for whom I'm theoretically saving a lot of time) without affecting all of the people who don't.

(Fortunately, there are also tons of free alternatives for commercial websites on a less-than-$39 budget!)
Blogger Cabel 2/08/2008 12:08 AM  
Love it — I've wanted something like this ever since I saw the effect on apple.com - but I'm not really familiar enough with JS… Anyway - what do you consider as commercial? Is a blog with ads, eg: Adsense, shown on it commercial, or is it only sites that sell something, or websites for for-profit companies?
Blogger Paul Walker 2/08/2008 12:14 AM  
cabel: Yeah, I agree that good tech should be used as widely as possible, I wasn't defending the idea of exclusivity, just expressing my understanding of how developers justify buying some things but not others. At a certain point, it's not about the money, or whether there are free or cheaper alternatives, it's more about it being an obvious and simple purchase.

If you really do want to see it used as widely as possible, why not encourage the professional designers to adopt it into their arsenals by making the commercial license multi-use? It isn't about the cost, it's about ease-of-use and ease-of-purchase-decision for the designer. Charge whatever but don't load the purchase with this mental overhead of having to remember buy a license each and every time you cut n' paste parts of an old website into a new one. That's just a recipe for piracy, better to get a lump sum up front.

Again, thanks for releasing this - I don't have the talent to do what you do and my suggestions should be considered entirely as those of an armchair spectator.

By the way, having thought about it some more, it strikes me that one of the nicest things about Coda, for me, was clips and it would be interesting to see Coda start to include "Pro" clips, such as one that adds FZ. Any chance of that happening?

And, in the meantime, is there any chance you'll be offering a Coda + FZ(commercial) bundle?
Blogger donnacha 2/08/2008 12:41 AM  
FancyZoom is absolutely stunning! No doubt about that.

But I find 39 bucks a little over-prized. Just think about it:
- Mint is a complete website tracking solution with support for plugins for just 30 bucks. (haveamint.com)
- PHPlogin is a complete login and user management solution for just 29 bucks. (phplogin.net)
(those two just came to my mind as I have bought both of them, I'm not affiliated with them in any way.)

Both of these packages are licensed per-site. … Just like FancyZoom.
Both come with a huge set of features. … Unlike FancyZoom.
Both are well written and designed. … Just like FancyZoom.

Now about FancyZoom: What does it give you?
- The fanciest online image zoom component available. Right. … but … that's it?

I think you get my point, don't ya?

Vincent
Anonymous Vincent 2/08/2008 1:01 AM  
Hey Vincent!. Mint is totally awesome, and one of my favorite web applications of all time! A huge value! Anyway.

You're right — FancyZoom is fancy! It might be pricey for some commercial websites that are running lean. The good news is that there are tons of totally free image zooming scripts out there, such as the excellent Lightbox. I'd probably recommend one of those scripts for a website that doesn't have a spare $39 in their budget.
Blogger Cabel 2/08/2008 1:10 AM  
Donnacha: Licensing per domain is the easiest way to tackle this for me. If I visit microsoft.com and stuff be zoomin' all up in there, I can instantly see if microsoft.com bought a license. (Assuming anyone does.) But I have no idea what web authors worked on microsoft.com, or how to look up their in-house or freelance or agency team members to check, etc. I think most designers should be able to bill through $39 to their client that they're already billing anyway. Honestly, who knows? I sure don't! It doesn't even really matter that much. But thanks for the feedback!
Blogger Cabel 2/08/2008 1:15 AM  
Great script!!! But I was wondering, how do I make option-click downloads work?
OpenID maarten.vancoile@mac.com 2/08/2008 1:35 AM  
Caleb: I don't have any image-heavy website that would need something like FancyZoom. Not even the free ones ;) …
… the discrepancy just struck me when I saw the price tag. ;)

I find it totally correct to make this thing commercial. It's really worth it. But I'd rather have chosen something like:

- 5 bucks for non-commercial use.
- 25 bucks for non-commercial use.

If I really like an app or script I'm more than willing to pay the author a coffee. Even if my purpose was completely non-commercial.
But I think a product should be in a price range that makes sence when being compared to others.
Anonymous Vincent 2/08/2008 2:03 AM  
Ooops, of course I meant "Cabel" not "Caleb" :P
Anonymous Vincent 2/08/2008 2:05 AM  
cabel: Fair enough, I guess that makes sense from a policing perspective ... although I dearly hope that you won't be wasting your time chasing license infringers, time you could spend creating more cool stuff :)

I can see that you are now starting to get frustrated with people questioning the $39 and, of course, yes, $39 is not going to seem like much the owner of a successful software company - the griping must seem insulting, given that you've just made this tremendous gift to non-commercial users.

Try to understand, though, that most of us, especially outside America, are now working in a far more difficult environment than a few years ago. Many have to hammer out several sites per day for extremely low, set prices and simply don't have the option to casually bill our clients for extra bits and pieces - people aren't being cheap and it isn't that they are somehow bums because they don't have the "proper" corporate clients you're used to dealing with, they are real, working people and that $39, recurring, is coming out of their pockets.

They are just regular guys and gals trying to be ethical and pay a fair price for your good work rather than pirate it but, at the same time, struggling to understand why this one (admittedly extremely nice) feature is worth hundreds of dollars per week, every week, whereas a fantastic set of CMS themes that they'll use hundreds of times has a once-off cost of $200 for a developers license.

Imagine if Coda or Dreamweaver cost $39 per website - sure, the guys working on Microsoft.com and hundreds of other corporate, high-end designers would buy them, but the other 95% of designers would not.

As I said, your approach makes a lot of sense from a policing perspective, not so much from a sales perspective - you will sell tons and tons of licenses, but sadly the smaller designers, who work on a higher volume of lower value sites, are either left out or will feel somewhat justified in simply pirating your work. And, by the way, we "low-grade" designers are actually 95% of your potential market - what we lack in cachet we make up for in sheer bulk.

As you said, this is all experimental, I hope you will, at some point, consider a more inclusive approach.

And, please, don't get so frustrated/annoyed with those of us who have balked at this pricing scheme, it's all just feedback.
Blogger donnacha 2/08/2008 2:10 AM  
hey cable!
thanks for these fancy lines of code!
what about shortcuts?
"x", "c" or "w" for close, or the arrowkeys for forward etc.
Anonymous paul 2/08/2008 3:28 AM  
thanks... very nice!
Blogger البرباش 2/08/2008 3:57 AM  
This is copied from Apple's website

http://www.apple.com/macbookair/design.html
Blogger Anil Kumar 2/08/2008 4:52 AM  
Anil Kumar: Obviously you didn't read Cabel's post:

"Since I originally wrote this script, there are now a lot of image zoomers to choose from (including a similar effect now on Apple's own site!), such as the popular (and inspiring) Lightbox."
Anonymous Vincent 2/08/2008 5:24 AM  
It looks good.

It doesn't work in Opera though.
Blogger kirshaw 2/08/2008 5:52 AM  
Wow... That's one amazing image zoomer. I've written a similar one in the past, but it's just not as magical as FZ.

I also find the 39$ price point very fair. It's a premium product that you've definitely put a lot of effort into. Given its ease of use, those 39$ practically pay for themselves...

And I'm also amazed how the fact that there are free alternatives like lightbox actually justify a rather high price point -- if you don't want to pay for it, use something else...

The script's a bit buggy in IE 6, though (SP2, tested under Parallels):
1) the PNGs aren't transparent (as expected). By using a PNG behaviour file, this could easily be solved, though.
2) Sometimes the image flashes while closing
3) I don't know how I manged to do that, but once the image didn't zoom in when clicked, but moved to the center of the page, becoming smaller and smaller, until it disappeared. (maybe the image wasn't completetly loaded yet, and IE thought the dimensions where 0x0px?)
Anonymous Anonymous 2/08/2008 5:53 AM  
I'm seeing a white border at the top, looks like a single pixel, in Firefox 3b2 on Mac and Firefox 2 on Windows. Looks fine in Safari 3 (with shadow!)

btw thanks for a great little lib.
Anonymous col 2/08/2008 6:19 AM  
Chapeau! Best Javascript image component I've seen so far!

Great job!

Dominic Morin
www.zypto.com
Anonymous Anonymous 2/08/2008 6:29 AM  
your page and the tool are both broken in opera (the most compliant browser). sorry but your script is still beta imho. good luck with it. =]
Anonymous Anonymous 2/08/2008 7:08 AM  
I have a pretty weird problem when I tried to use it on my site . im using textpattern and i have another onload tag in the body, so i figured out that i should do it this way :

body onload="preloadImages(); setupZoom();"

the thing is as u can see on the test page on my site, when u click the images, they do the opposite of zoom! they go fly into a little square window at the top of the page. any ideas? it seemed like a cool feature to have
Blogger pketh 2/08/2008 7:15 AM  
Little bug I found: it seems that sometimes if you double click on an image after you've clicked on it once - while you get the loading spinner - it goes into a limbo (opening and closing an image continuously) that can't be stopped other than by reloading the page. Clicking on another image moves the problem to that. I guess this might be a bigger problem if the image was large or the server was taking time to load the image.

Otherwise: Brilliant! I'll be using this!

k
Anonymous kristian 2/08/2008 7:32 AM  
No disrespect intended, but I'll continue to use Lightbox. It dims the background, supports keyboard navigation, and does everything else that FZ does (except, I suppose, actually "zoom" the image). Its implementation also doesn't require adding yet another thing to the body's onload event.
Anonymous Anonymous 2/08/2008 7:36 AM  
I see that you and your cousin are both using Blogger, but I can't get it working in WordPress.

I have the script tags pointing directly to the php code (which I can pull it up in my browser), but it doesn't do anything to my pictures.

Any ideas? TIA.
Blogger BillyG 2/08/2008 8:22 AM  
BillyG: Did you include the onload handler? E-mail me your page and I can check it out.

Anonymous: Indeed, FancyZoom is all about the zoom! :)

kristian: If you can reproduce that with some steps, please let me know. I'd like to fix it too.

pketh: A good mystery. Can you e-mail me? I bet we can solve it with some code hacking.

Finally, RE: Opera, I'll definitely take a look at it at some point. Strange that the getSize() code to get the browser window dimensions works fine in every other browser, though!
Blogger Cabel 2/08/2008 9:10 AM  
Cool script but it is kinda worrying that Donnacha's point about the price, how you wouldn't pay $39 per site for dreamweaver, is being ignored. It might be a good deal for inhouse web developers working on just one site all the time or just a few big, well-funded projects but the rest of us can't afford to pay thousands per year. Also a bad sign that the developer ignores difficult questions. If you expect a cut on everything we do, surely it is wrong to ignore people.
Anonymous PixelGirl 2/08/2008 10:03 AM  
nice, maybe you can find a solution for a faster switch between the images...

--------------------
we love T-shirts
http://www.dexflu.eu
Anonymous Anonymous 2/08/2008 10:14 AM  
This is really great, thanks for sharing your work/time so generously. I have one question ... how hard would it be to apply the effect to an image with caption text? Impossible? Easy hack? I'd be very interested in knowing.

Thanks,
Tom T
Anonymous tomtwigg 2/08/2008 10:34 AM  
Really, you can only use onetime for $39?
365 x $39 = $14235, more than my pay!
Nice script, greedy man.
Anonymous ฟหกด 2/08/2008 10:45 AM  
ฟหกด - Haha — dude, I'm not that crazy.
"One-time fee" means you only have to pay once, not that you can only use it for one day.
$39 x 1 = only $39, per website.
Blogger Cabel 2/08/2008 10:54 AM  
Who designed the icon of FancyZoom (with the lense ?)
Anonymous Greg 2/08/2008 11:06 AM  
Pixelgirl: If I was ignoring, I wouldn't be posting! :) Feedback is always noted. I just think of FancyZoom as a "site add-on" that pluses a website in exchange for a small license fee. I can't imagine how FancyZoom could cost you thousands per year — unless you're not charging clients correctly, or your site doesn't make money, in which case you don't need to pay the license fee anyway! :) Ultimately, I feel if a client doesn't see value in paying $39 for goofy zooming images, it's really not big deal — there are tons of free and good alternatives you can point them towards!
Blogger Cabel 2/08/2008 11:06 AM  
ฟหกด: FZ isn't required to make a website work. I'd say if you can't charge the $39 to your web design client, seriously don't use it! Use one of the free ones instead. There's no earthly reason you should lose money on using a crazy image zooming script! :)
Blogger Cabel 2/08/2008 11:09 AM  
Screw the price haters, if they don't like it they don't have to buy it!

Great script! I'm installing it on my non-comm site now, would be pleased to pay for it in the future.
Anonymous JimmyJojo 2/08/2008 11:10 AM  
Greg: Fantastic question! That was the work of Kenichi Yoshida, icon genius and, actually, newest employee of Panic Japan! I gotta post about that someday...
Blogger Cabel 2/08/2008 11:11 AM  
Cabel: Wow that's awesome ! I was wondering what was doing Mr. Yoshida as he said on his blog that he was going to have some profesionnal changes. I'm glad to hear that he's now working full time with you.
Anonymous Greg 2/08/2008 11:15 AM  
Cabel, is there anyway to include some sort of navigation from picture to picture. I love how easy this is to use, and I'd love to use it in my galleries. I think it'd be best if you could mouseover the right side and get a "next" link and mouseover the left side and get a "previous" link.
Blogger Derek 2/08/2008 11:21 AM  
Cabel, I notice that you are deleting quite a few posts, understandably in some cases, but I think there were some valid points. I hope you will allow this comment to stand. I met you briefly at MWSF and you seemed like a reasonable guy.

Personally, I think the price thing is a none issue - you are not providing a developers license, so, for whatever reason, you are skipping the low-end of the market. Realistically, the small fish won't bother to license and, realistically, you're not going to bother chasing them down. You are obviously aiming to create a scenario in which anyone working on an important enough project for $39 to be no big deal will pay, that will be enough to make the project worthwhile and you won't waste time chasing anyone.

Of course, that does create a conundrum for the small fish who want to be honest, LOL, but they should stand back and read between the lines. Personally, though, I would give them some route to legitimacy with a multiple use license for around the same price as Coda. You might be surprised at how many small fish there are.

Good luck with this, hope you get the chance to add some navigation within the pop-up; I love Apple's approach, putting thumbnails under the main photo.
Anonymous stantheman 2/08/2008 11:36 AM  
stantheman: Actually, I only deleted one post here and its reply — a (funny) but super-off-topic troll regarding foreigners that would have caused instant collapse of these comments within milliseconds. :) Anyway, I read everything, and I'll certainly consider a more small-time-friendly licensing option if there's enough demand and it makes sense. RIght now, like I originally said, this is just a huge experiment. :)
Blogger Cabel 2/08/2008 11:42 AM  
This is totally awesome. You'll be hearing from me (to the tune of $40) when I launch my commercial web site in about a month.

I did notice that, occasionally, an image will zoom down to a point in the center of the page (with a comically oversized close box hanging off). This happens exactly once every time I load this page, in every browser I've tried (and I've tried most of them). It appears related to the "Loading" graphic, and usually happens fairly early, e.g. on the third or fifth image you click.

(Also, I've been clicking images in fairly rapid succession to test how well this deals with trigger-happy users, if that helps.)
Blogger Ryos 2/08/2008 11:56 AM  
Hi Cabel,

I'm getting the same endless zoom-in, zoom-out, repeat to infinity bug Kristian mentioned earlier (Safari 3.0.4).

To replicate.
Click on a thumbnail.
Click on same thumbnail again BEFORE the image has zoomed in (e.g. while the spinny wheel is still spinning).
When image zooms in it goes into an endless zoom in zoom out loop.

If you can't replicate let me know and I'll see if I can get a screen capture movie or something.

Haven't tested for it in other browsers.

Cheers,

Dave.
Anonymous Dave 2/08/2008 11:59 AM  
Dave: I think you've got a good case, and it helps that my internet is slow right now. :) I'll try to do some debugging right now! :)
Blogger Cabel 2/08/2008 12:04 PM  
RE: a smarter licensing option.

Awesome, I had pretty much written off using your script until I read that. My problem is only partly the price although, yes, it really should be in line with the cost of developer licenses for templates. A much, MUCH bigger problem than price is that I don't want to muck around with payments for every single website I create - imagine if you had to take out your credit card every time you used coda. Most of us would LOVE to have the luxury of spending weeks working on one site, like in the old days, but now we have to work much faster, slapping together standard elements, none of which require per-use payment. I bet most of the people saying what great value $39 is will end up using it on more than the site they license it for, more out of laziness than dishonesty!
Anonymous PhotoCynth 2/08/2008 12:07 PM  
Hey,

I noticed something that could be considered a bug...

If you click on all the images without closing them something happens in safari. Find an image with a caption. Then click on one that doesn't. The caption box stays there and then the little stuff doesn't go away.

Jeremy
Anonymous King Kovifor 2/08/2008 1:18 PM  
Awesome script, Cabel. It's exactly the lightweight solution I've been looking for to use on my portfolio site. Thanks for sharing your work with the rest of us!
Blogger Allan 2/08/2008 2:33 PM  
I thought I'd throw out a request...

It sure would be sweet if this could support transparency.

I tested it with an image that had a circle shape surrounded by transparency...and the FancyZoom just uses the overall width/height of the image and adds the shadow behind that. It also takes the background color from the container div and makes it the background of the transparent areas in the "zoomed" image.

If transparency support were possible, I could see a bunch of other uses for this, beyond just image display.

Again, thanks.
Blogger Ben 2/08/2008 2:49 PM  
I tried it is notworking notzoomed as shown in your example but opens in a seperate window.
raghavendra
Anonymous raghanna 2/08/2008 4:08 PM  
Not sure about any others our there, but I for 1 think 40 bucks is *CRAZY*

...then to add "per site" and I'm thinking you're on drugs!

I'm all in favour of 'shareware' but try to keep it real

- You weren't a record company boss in a previous life were you?

Dave Morgan
AU
Anonymous Anonymous 2/08/2008 6:13 PM  
Hey Dave! Like I've said previously in this thread, if your site is non-commercial there's no need to pay, and if your web design clients don't want to pay for crazy image zooming, then there are lots of other good scripts that are totally free! It's really intended for companies who want to add this effect to their site. Ultimately, really, seriously, it doesn't even matter that much. :)
Blogger Cabel 2/08/2008 6:28 PM  
Cabel: I know you must be TIRED of answering questions about licensing by now (sorry!), so I'll duck down and just toss one more over the fence. Do you consider government use to be commercial or not-for-profit? (For example, if a government agency wanted to use the script in one of its sites?) By definition, government *is* non-profit, but license agreements typically explicitly group government/non-profit use together, and your license doesn't mention government, so I just wanted to clarify. Thanks!
Anonymous Scott 2/08/2008 7:28 PM  
Leave the poor man alone and let him sell his work. :)

Seriously, compared to all the other costs involved with developing and launching a commercial website, $40 is chump change. We're a very small "mom 'n pop" launching an internet store for our home-based business, and $40 is chump change for us.

This is a luxury, plain and simple. It's head and shoulders above the solution I was going to launch with (opening a new window), but if I couldn't afford the asking price it would have worked just fine. We don't have the resources to develop something like this in-house, but for $40, I'm sold.

The only really valid argument I've heard is from the guy who does several web sites a day. (Several a day? What the heck kind of web sites can you produce several of per day?) However, here's a thought: Cabel seems to be pretty flexible on this. Why don't you send him an email and negotiate a multi-site license?
Blogger Ryos 2/08/2008 8:45 PM  
Whoa- look at all this hype, Cabel. I'm proud of you :-) I'm gonna download Safari (and delete Mozilla) just to check this out..
Blogger Aerodyna 2/08/2008 8:46 PM  
Hmmm, interesting conversation overnight, clearly a big divide in opinion.

Ryos is right - Cabel has read our posts and has suggested that he might introduce changes in the future, but it is pretty clear that, for now, this offering is aimed at either non-commercial users or those who can afford $39 per website.

Quite a few, like Ryos with his one-off website for his own business, can, whereas a guy cranking out 2 or 3 blogs or small business websites per day at a hundred bucks each cannot.

It is Cabel's baby, he can do what he wants with it. It is a pity because it is a great piece of work but, of course, the vast majority of potential purchasers are going to shake their heads, wonder what he's smoking and calmly pirate it.
Blogger donnacha 2/08/2008 9:56 PM  
Donnacha: The vast majority? What's your source for that figure, anyway? ;) Seriously, though, you're right — for now, this isn't going to be the best solution for a dude who charges a hundred bucks for a web site (!). To be honest I didn't even know there were people doing that for a living, making three websites a day. How do you even do that? This is totally shocking to me, and I hope to look into it more. (You got any pointers to companies like this? I'd love to see what these kinds of sites look like!)

I also totally agree with you that pirating something simply because you don't like the price is the ultimate stupid sandwich, with a 32 oz. ice cold cup of silly on the side. People will be people, sure. But if someone doesn't think FancyZoom is worth the asking price, that's 100% fine with me and literally no problem — but they should use one of many, totally free, totally comparable options instead, not pirate this one, yeah? If only we could all steal the things we arbitrarily think are too expensive. I'd start with snagging a jumbo jet. Those things are, like, millions of dollars!