<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi there, I'm appending some divs with a thumbnail to an existing div called "main_area" and i would like to take controll of the appended links, but I can't. I have tried this:
$("#main_area").append("<div class="pics"><a href="pics/1.jpg"><img src="pics/1_thumb.jpg" width="100px" height="100px"></a></div>", function(){
$(".pics a").click(function(event){
return null;
})
});
I have also tried to add a function when document ready to control $("#main_area a") but it neither works, It seems like appended content is out of the DOM, how can I reach those elements?
</td></tr></table>