Thickbox from content loaded via AJAX using jquery
Working on a project called Can You Draw The Internet? I was hit with a problem with my thickbox modal when content was loaded via AJAX. The thickbox modal would appear twice as the function TB_init() would be initiated twice.
Searching the net, VinayRas came up with a solution that did the trick, the function highlighted below:
If you call TB_init twice over the same content, you can end up transforming your thickbox links twice.
To avoid this, I modified TB_init like so:
var t = this.title || this.name || null;
var g = this.rel || false;
$('a.thickbox').removeClass('thickbox'); // I added this line…