私はそうのようなページの表を生成します。クリッカブルjqueryのテーブルの行
<table id="documents" class="table-striped">
<thead>
<tr>
<th>File Name::</th>
<th>Date Uploaded</th>
</tr>
</thead>
{{#each Documents}}
<tr id="{{Name}}">
<td id="name" name="name">{{Name}}</td>
<td id="date" name="date">{{Date}}</td>
</tr>
{{/each}}
</table>
は、ハンドルバー を使用してとjQueryを使用して、私はそうのようなテーブル行のクリック可能にする:しようとして
$(function(){
$("#documents tr").click(function() {
var name = $(this).find('td:eq(0)').html;
alert(name);
});
});
とIMを#nameテーブルのデータから値を表示します。 しかし、それは私に未定義を与え続け、私は選択されたテーブルの行と名前テーブルのデータオブジェクトからデータを取得する方法を把握することができません。