私はこのようなテーブルを持っています:
<table id=reportTbl>
<tbody>
<tr>
<td>
<table id=list>
<tbody>
<tr>
<td>
<a title="View Report" onclick="viewReport(123);"><img src="../images/report/icon_pdf.gif" border="0"></a>
</td>
<td>Customer Orders</td>
<td>USA</td>
<td>Jul 20 2012 3:32PM</td>
</tr>
.....
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
#list
テーブルのテーブル行全体をクリックできるようにしたい。追加しようと思った
$('#reportTbl #list a').each( function() {
// I have other code in this section
// ....
// end other section
$(this).closest('tr').click( function() { $(this).find('a[title="View Report"]').click(); });
});
しかし、行をクリックすると、#list
テーブル内のすべてのリンクのウィンドウが開き続けます。さまざまな種類のjQuery呼び出しを試しましたが、それらはすべて同じことを行います。