My a-tag (link) contains innerHTML which is an image like this:
.innerHTML =
use this.
var altName=$('a img').attr('alt');