hi
html is
<table>
<tr>
<td><img src="ex.jpg" class="edit" name="n1"></td>
<td><img src="ex.jpg" class="edit" name="n2"></td>
<td><img src="ex.jpg" class="edit" name="n3"></td>
<td><img src="ex.jpg" class="edit" name="n4"></td>
</tr>
</table>
Jquery code is:
$(".edit").click(function() {
$(".edit").each(function(){
alert($(this).attr("name"));
});
});
Here is, it only alerts one name, i mean just alerts "n1".
How can i alert name attr. of each element ?
Thank you