Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think the problem is, that this <code>&lt;a class='thickbox'</code> just does not have the event bound to it.</p> <p>I have had exactly the same problems, when i copied existing dom elements which contained links and all bound events stopped working on those newly created elements. all i had to do was to bind events to those elements too. </p> <p>So just do your thickbox call to this new element too. Do not just use the same code you use at $(document).ready. When i did something like that the events started working on new elements, but fired twice on old elements.</p> <p>Edit in response of the comment: I have no idea how thickbox works. I've always preferred Slimbox. I did find some example that could help you. REad this(its about thickbox):<a href="http://15daysofjquery.com/jquery-lightbox/19/" rel="nofollow noreferrer">http://15daysofjquery.com/jquery-lightbox/19/</a></p> <p>Basically, when page is beeing loaded, this function fires:</p> <pre><code>function TB_init(){ $("a.thickbox").click(function(){ var t = this.title || this.innerHTML || this.href; TB_show(t,this.href); this.blur(); return false; }); </code></pre> <p>now all a tags with class thickbox will open the stuff link points to in thickbox window. If new a elements are added to the page, they do not have this event bound to them, so after doing the ajax magic and pulling that new content out of somewhere, you need to bind that $("a.thickbox").click(function(){ to the new link to. so just add something like </p> <pre><code>$(newlinkselector).click(function{ etc.. etc.. </code></pre> <p>in the script, right after the place you render the stuff that ajax call gives back to you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload