I've recently been finishing off a site where I needed a lightbox to simplify showing several photos for each product. I've used Thickbox in the past, as it comes with WordPress by default, however this is a custom built site. I already had the latest version of jQuery running for other functions on the site, so just needed to grab a copy of thickbox, upload that, add the necessary code and that should be that.
3 hours of going around in circles later… and still no joy! After checking over my code piece by piece, trying the code out of WordPress, trying the page on another server just in case, and trying every other option I could think of, I finally tried uploading jQuery 1.2.6 from my WordPress 2.7 folder on my computer, and hey presto, it all worked!
It seems that there is a minor change required for thickbox to work with the latest jQuery version. After a bit of searching around I found out that what's needed is on line 79 of the existing thickbox file you need to change the line
- Existing Thickbox Code
-
- TB_TempArray = $("a[@rel="+imageGroup+"]").get();
to not include the @ sign in it ie.
- New Thickbox Code
-
- TB_TempArray = $("a[rel="+imageGroup+"]").get();
Such a simple change that caused a few hours of frustration! So hopefully it may be of use to someone else









Thanks this saved my couple hours?
thanks Sarah! much appreciated!
this is awesome! so glad i found your fix. THANK YOU SO MUCH for posting!!!!!!!!
Thanks a lot. Half a day lost, but another half saved…
Awesome! You helped me alot with this tiny change :3
thank you so much! i've been looking everywhere for a solution! so so simple!
Has anyone an idea to solve this in the minimized version?
thanks!
I believe someone left a comment on how to solve the minimised version if you read through them
Thank you so much this saved me from a headache!
THANKS A LOT !!
Great stuff, saved me a lot of hassle.
Thank you for this it saved me a lot of time.
Thank You
I agree with everybody wasted hours trying to get it working with opencart, fixed in mins.
Thankyou thankyou thankyou
OMG what a find …. thanks so much!
Thanks Sarah.
You're the tops!
Pingback: Fix The Rel Tag On Thickbox | The Musings of A Lost American
Nice fix……Thanks a lot……
Thank you. Saved me hours of digging. Nice Post!
Thank you! Helped a lot here at work!!!
Thanks!!! Very helpful!!
yeah!!!! remove the only @ in the compressed version, and get it working!!!
THXS!
Thanks a lot
Pingback: Fixed: Thickbox not working with multiple images « Sup-a-Dillie-O
Pingback: Thickbox being thick - Monio Design - Creative Coding of Wordpress sites
Oh oui c'est bon ça !!
Thank you very much for this.