views:

142

answers:

1

Id there an event I can hook into? I've looked through the docs, and unless my Wednesday brain is failing me I can't see anything along those lines.

I am loading AJAX content into a thickbox using the standard way (adding the "thickbox" css class), but when it's loaded I want to do some jQuery magic on some of the loaded content.

What should I do?

+2  A: 

Thickbox is quite old now and does not confirm to the standard jQuery plugin modal (e.g providing options, callbacks etc) Everything is done by looking at the anchor attributes. You could build this into the source, alternatively look elsewhere for a lightbox that gives you the functionality you require. Tinybox maybe?

Another option maybe to use the ajax global events such as $.ajaxSuccess. However thickbox will have had chance to render the content when these events are fired. You could use a setTimeout but it is not a good solution imo.

redsquare
I'm looking at Shadowbox aswell - I need to pay for a commercial license but if it's that good it's worth £10
joshcomley
Big list here - http://planetozh.com/projects/lightbox-clones/ - looks like Shadowbox is the best (at a small cost if you're using it commercially), but only if you *need* the features, otherwise pretty much any of the others are good. I will be using Tinybox in the future when I don't need it to be quite so sexy :)
joshcomley