I have an HTML table with one column being email addresses; spambot issues aside, I'd like to convert each <td>
element in this column to a mailto: link.
Here's what I've got:
$("table.data tbody tr td:last").each(function() {
var email = $(this).val();
$(this).html('<a href="mailto:' + email + '">' + email + '</a>');
});
And this is the table (sample):
<tr>
<td>Joe</td>
<td>Shmoe</td>
<td>[email protected]</td>
</tr>
What's going wrong?
Thanks!