Make ThickBox Work with Other JavaScript Libraries / Resolve ThickBox Conflict Issues

ThickBox is a cool visualization tool based on Jquery JavaScript library. ThickBox helps you display photos in a cool way and is useful in many web projects.

The problem

ThickBox does not work when the HTML pages has other JavaScript libraries such as Mootools.

Debuging the error reveals this:

$(domChunk) is null

The solution

  1. Add this JavaScript in your page, just after you load the jQuery JavaScript-jQuery.noConflict();
  2. Replace every instances of ‘$’ with ‘jQuery’ in thickbox.js

This will make jQuery and ThinkBox play nice with other JavaScript libraries.

Leave a Reply