As long as a my hyperlink isn't touched by jQuery thickbox works fine. But if the following code is executed which replaces the link, it opens in a new window.
jQuery("#test")[0].innerHTML = '<a href="http://example.com?KeepThis=true&TB_iframe=true&height=600&width=800">Test</a>';
Take a look at One Word A Day on slopjong.de
How can I fix this?
I've just seen that I forgot the class=thickbox but in the original code it's there.
Fixed it.
I had to remove the span tag
<span id="owad_alt1"><a href="...">text</a></span>
and to adopt the javascript
jQuery("#owad_alt1")[0].innerHTML = 'some text';
jQuery("#owad_alt1")[0].href = 'blubb.html?KeepThis=true&TB_iframe=true&height=600&width=800';
Now it thickbox works fine.