Jquery and Thickbox noConflict mode PDF Print E-mail
Written by Websmurf   
Saturday, 22 March 2008

It took me quite a while to figure this out, so here is a solution for anyone who finds it useful :)

If you are running Jquery in noConflict mode, the Thickbox script will not work anymore. Now, there are two solutions.. I'll leave it up to you which you like best.

The first is to place this in your head section:

(function($) {
$(function() {
// content of Thickbox script
});
})(jQuery);

It won't be possible to use the tb_init function and others because they are executed within the function.  Which can be quite annoying if you're combining the output of ajax with Thickbox.

 

Another solution is, to open the uncompressed version of Thickbox, and to replace all occurrences of $ with jQuery or the prefix you are using.
Then you will be able to use the normal functionality of Thickbox..

It will take up a bit more space though... 



Last Updated ( Saturday, 22 March 2008 )
 
< Prev