<section class="photos">
<table>
<tr>
<td><a href="/a"><img src="b.jpg" /></a></td>
<td><a href="/a"><img src="b.jpg" /></a></td>
<td><a href="/a"><img src="b.jpg" /></a></td>
</tr>
<tr>
<td><a href="/a"><img src="b.jpg" /></a></td>
<td><a href="/a"><img src="b.jpg" /></a></td>
</tr>
</table>
</section>
And then I am trying to iterate through each to return the link href and the image src.
$(".photos td").each(function (index, value) {
console.log(value.a.attr('href'));
console.log(value.img.attr('src'));
});
The above pseudo-broken-code doesn't unfortunately work. Any ideas?