I have a table with a td in it like so:
<td age="123">0</td>
Using jQuery, the following JavaScript
$('td[age]').each(function(){
console.log($('this').attr('age'));
});
prints ‘undefined’ to the console in Chrome.
Why is it not printing “123”?
Where you have
You should instead have