Integrating thickbox with imageflow

August 5th, 2008 § 33 comments

Update: Modified to work with version 1.3 of imageflow

- a simple hack

If you already use thickbox on your site, there’s a simple way to integrate it with the ImageFlow script by Finn Rudolph.

Imageflow is a mimic of Apple’s cover flow for Mac OS X and iTunes, and combining it with Thickbox is similar to QuickLook for the Mac.

Step 1

Make sure you have the thickbox.js, jquery.js and thickbox.css scripts uploaded to your server, and referenced in the head of your web page.

<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/thickbox.js"></script>
<link rel="stylesheet" type="text/css" href="/styles/thickbox.css" media="screen" />

Step 2

Change the longdesc attribute for each image in the imageflow div to:

javascript:tb_show( 'caption', 'images/image.jpg', 'slideshow1' )

where ‘caption’ is the caption of the image and ‘images/image.jpg’ is the URL of the image. Unfortunately the ‘slideshow1′ – gallery option doesn’t seem to work with this implementation. I’m looking into it, but in the mean time if you have any ideas let me know!

Step 3

Small CSS fixes: Open thickbox.css, and change the z-index of #TB_window to 10200 (higher than 10002). The z-index of the #scrollbar and #slider in imageflow.css are 10001 and 10002 respectively. #TB_window must have a z-index higher than both of these.

Change the z-index of #TB_overlay to 10199. This is to make sure the (grey) background is on top of the slider and scrollbar as well.

Step 4

There is no step 4 ;)
You can preview my hack here

OR – to make your life even easier – you can download the whole package here [106Kb]
** Version 1.3

I’m here for support, and will try to update to the latest version of Imageflow whenever it’s released. If you appreciate my work, then please do donate – it’s definitely not ‘free’ for me to do all this time-consuming stuff :)

Donate to Quicksilver 1Password Plugin

Tagged imageflow, javascript, thickbox

§ 33 Responses to Integrating thickbox with imageflow"

  • Donvil says:
    July 2, 2009 at 1:06 am

    Thanks, it would ice the cake if I could make that work as well. Let me know when you do. Ttyl.

  • Patrick says:
    June 23, 2009 at 7:36 am

    Hi Donvil,
    Unfortunately I still haven’t found a solution :(
    I’m still looking into it when I have some free time though!

  • Donvil says:
    June 23, 2009 at 12:11 am

    Hi Patrick,
    Was there ever a solution found for image groups? Since the “rel” attribute does not work when applied to the img tag.

  • Donvil says:
    June 22, 2009 at 5:47 pm

    Dont bother i figured it out. My imageflow.js was set to open documents in a different window.

  • Donvil says:
    June 22, 2009 at 5:20 pm

    Great instructions. It works for the images but NOT for iframe contents. I tried to use it with another section I have under my website development section but, it does not work. Let me know if there is an alternate way of doing this.

  • Wullix says:
    February 11, 2009 at 11:22 am

    If you wish to use javascript:tb_show( ‘caption’, ‘images/image.jpg’, ‘slideshow1′ ) you must add in any images tag from the galerie this tag rel=”slideshow1″

    I hop this will help you.

    Have a nice day

  • Patrick says:
    February 11, 2009 at 12:04 am

    Glad you managed to find a solution Brendon!

    Although ThickBox is still widely used, it’s a bit old and deprecated now.
    http://codylindley.com/thickboxforum/comments.php?DiscussionID=1435&page=1#Item_0

    A shame really as ThickBox was the best of all the boxes!

  • Brendon Kozlowski says:
    February 10, 2009 at 9:58 pm

    I believe ThickBox is out-of-date from jQuery’s current advanced selector’s functionality. I think my script stopped working because I’m using Google’s JavaScript API, which auto-updates my version of jQuery whenever there’s a new or updated release.

    The @ symbol is no longer used in jQuery’s selectors. I removed the @ selector, and it worked fine. I also removed the ‘slideshow1′ from the ImageFlow integration which also solved the issue (since continuous slideshows don’t work anyway…) without altering any ThickBox code (if you wanted to continue to use the compressed ThickBox version).

    Sorry for all the spam, Patrick! :D

  • Brendon Kozlowski says:
    February 10, 2009 at 9:09 pm

    Just like dennis, the problem I was having was thanks to, and occured on line 73 of thickbox.js:
    TB_TempArray = $(”a[@rel="+imageGroup+"]“).get();

    As I’ve spammed this blog post quite a bit already, if I find a solution I’ll post back yet again. :P

  • Brendon Kozlowski says:
    February 10, 2009 at 6:49 pm

    I seem to have re-broken it. The code is very finicky. When I add a single paragraph tag either above or below, it stops working. Firebug reports “1 error” but then doesn’t display it. Web Developer Toolbar shows that the JS is properly pointing to the correct image file, but the loading bar shows up and never disappears.

    Ugh. I know you can’t fix it, but wanted to report this just in case someone else is having similar issues to let them know they aren’t alone.

« Older Comments
Newer Comments »

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

What's this?

You are currently reading Integrating thickbox with imageflow at Web Design.

meta

  • Author: Patrick
  • Comments: 33 Comments
  • Categories: Web Design

  • Pages

    • About Patrick Robertson
    • Bits & Bobs
    • Designing the World
    • Tags
    • Websites
  • Categories

    • Apps (5)
    • Holidays (1)
    • Mac OS X (8)
    • SEO (2)
    • Uncategorized (1)
    • Web Design (4)

© Patrick Robertson 2012

Powered by WordPress