I have this text file filled with some html code;
<span>test</span><p>welcome</p>
<span>Guest</span><p><img class="insertedImage" src="/dynamictemplate/uploads/temp/167-5-IMG_0755.JPG" width="80" height="80"/></p>
I'm reading this html data into a div element, however when I try to add a click event to the 'img' tag it's not working. I know it reads the the file correctly because if I add a css targeting the '.insertedImage' it works fine, but when I try to add a click event its not doing anything.
$('.insertedImage').click(function()
{
alert("clicked");
});
Anyone has an idea about what causing this problem?