And of course, now I can't seem to duplicate this. IGNORE
On 5/25/07, Su <[EMAIL PROTECTED]> wrote:
Klaus, I can't follow everything in your explanation below, but it sounds a lot more complicated than something I just noticed. Rodrigo's TB declaration reads: $('div.slot a').thickbox(); ...and that applies exactly to the original link in the actual HTML. Also, if I make a copy of the original div, both of the original HTML links continue working, though the JS-generated links fail, as has been shown. When the "add a trigger" link creates a new one, the div created has /two/ classes "slot new" and these aren the links that produce the empty TB window. BUT, I removed the "new" class from the generated links and everything suddenly worked perfectly. It doesn't actually explain anything directly, but it does seem wrong. From what I can gather of your comments, what I just described shouldn't have fixed the problem. On 5/25/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Rodrigo, it's inline content, right? > > What currently happens is this: When opening the Thickbox this content > gets captured in a closure and never gets reappended back to its > original location - it is appended to the modal with appendTo, e.g. it > is moved in the DOM. But when the modal gets closed it is emptied > without restoring the content to its origin. > > If you then add another Thickbox handler which refers to the same > content, this content is already empty if you've opened the Thickbox > with that content before from another handler. > > I don't want to clone the content, because I want to preserve existing > event handlers. I didn't restore the content, because (until now) it > worked the way it is, so I was fine with it. I have never thought about > the case you're talking of, so I will have to think of a way to solve > this. > > I guess I need to restore the content when closing the Thickbox... > > > -- Klaus >