|
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!
|