27
I haven't tested this, but here's my sugestion:
1- Check what action was performed on the html page as it was passed to the ajax page. In this case "img.innertrigger".
You can either create another option or use one the the existing:
ajaxed.php
if ($_GET['action']=="ajaxinner"){
myFunction_img_innertrigger();
}
2- Now inside the php function place the following code:
<a href="#TB_inline?height=155&width=300&inlineId=hiddenModalContent&modal=true" class="thickbox">Show hidden modal content.a>
3- In your html page, in order for thickbox to work, place this code inside your javascript area:
$("img.innertrigger").live("click", function() {
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
});
What this does is bind a click action to any image called "innertrigger" that is present OR IN THE FUTURE! It means that javascript will work for ajaxed pieces.
Don't forget to include thickbox.js in your html page.