The reason your code is not working is that jQuery(this)
in your alert is actually an anchor, and not an image, and thus, it does not have any src
attribute. Since your anchor contains an image, you'll be able to adjust your code to:
jQuery('#tab a').click(function() {
alert(jQuery(this).find('img').attr('src'));
});
David Hedlund
2009-11-27 16:36:13