• 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&amp;TB_iframe=true&amp;height=600&amp;width=800">Test</a>';

    Take a look at One Word A Day on slopjong.de

    How can I fix this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mcosx

    (@mcosx)

    I’ve just seen that I forgot the class=thickbox but in the original code it’s there.

    Thread Starter mcosx

    (@mcosx)

    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&amp;TB_iframe=true&amp;height=600&amp;width=800';

    Now it thickbox works fine.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Thickbox not working after replacing text by jQuery’ is closed to new replies.