load() with additional call inside - how to make it work?
I am having issues with loading external content and having the external content callback to the main jQuery code.
I am using:
-
$("element").load("index.php",{type:"test",id:IDvar});
When this is fully loaded how can I have my code be used in the external content without re-calling the code?
I have the same issue when I have an element with hide() and then I go to make it show().
Here's another example:
-
var ThisLinkLoc = ID;
$("#lightbox").html("<iframe allowtransparency='true' marginwidth='0' marginheight='0' hspace='0' vspace='0' frameborder='0' scrolling='no' src='index.php?type=Details&id=" + ThisLinkLoc + "' width='480' height='320' style='background-color: Transparent; border: 0;'></iframe> <div class='close'></div>");
$("#black_out").fadeIn("slow",function() {
$("#lightbox").fadeIn("slow");
});
$(".close").click(function() {
alert("Closing...?");
});
When I click on the ".close" element it does not work (it does nothing). How can I do this?
(That's 3 example of the same issue, sorry if this was unclear and I can explain betteR)