First time poster here...first have to thank the author for wonderful tool!

I just spent a good deal of time with something that I thought I'd share in case others happen to struggle with this. If you find that your overlay is not getting triggered after first one has been closed you may not have completely replaced the overlay div. I made the silly mistake of using jquery's .html to replace what was within the div (not actually replacing the entire div). Hence, overlay would not trigger. Here's an example:


// This works:
jQuery('#apple').replaceWith(markup);// Using .html on inner contents of a div does not actually replace the div so tools won't work
           
// Won't work:
jQuery('#apple').html(inner_markup);             
var api = jQuery("#apple").data("overlay"); //don't go down this route!
if(api) {api.load();} etc etc