function createPicItem(num) {
$("<div></div>")
.addClass("merchPic")
.append($("<img/>")
.attr("src", merch[num].picAdd)
).appendTo("#merchCatalog");
}//End of function CreatePicItem
//--------------------------------------------------
$("#merchCatalog div.merchPic").click(function () {
alert($(this+">img").attr("src"));
});
When the div is clicked I want to alert the src of its inner image.
But when I click it nothing happens... even the alert dialog does not pop up.
What am I doing wrong?