Say i have the following:
<a class="class1"><img src=".." /></a>
If I am currently in the click event of a.class1, how to I pull the 'src' value of the 'img'?
Update: for some reason neither of the suggestions below worked. My code looks like this:
$("a.class1").click( function() {
alert($(this).children('img').attr('src'));
});
This pops up 'undefined' (for both suggestions). Why is this happening?