View Single Post
Old 02-07-2008, 02:14 PM   PM User | #4
DeadlyDave
New to the CF scene

 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
DeadlyDave is an unknown quantity at this point
Thickbox & Lightbox Compatibility Solution

Step 1. In your html file put:

<script type="text/javascript" src="path-to/prototype.js"></script>
<script type="text/javascript" src="path-to/scriptaculous.js"></script>
<script type="text/javascript" src="path-to/jquery.js" charset="utf-8"></script>
<script>jQuery.noConflict();</script>


(followed by your Thickbox & Lightbox javascript includes...)



Step 2. In the thickbox.js add the following lines of code...

At the top, add the following red text line:

var tb_pathToImage = "path-to-images/loadingAnimation.gif";

/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/

(function($) { //* hide the namespace




......And then at the very bottom (end of file) add:

})(jQuery); //* hide the namespace



That should work... This fix seems to allow the '$' dollar sign to be exchanged for 'jQuery' in the thickbox.js and so avoids conflicts with the prototype javascript library.

NB. I was using the uncompressed version of Thickbox.
Versions I tested and got working are:
Thickbox 3.1
Lightbox 2.03.3
Prototype 1.6.0
JQuery 1.2.2

Hope that helps!
DeadlyDave is offline   Reply With Quote