我有一個jQuery的簡單位,它顯示當前行下方的行(如果選中)。jQuery單擊td行不發射事件
我想要什麼,如果所有的<td>
元素,但一個發射這種方法。
作品在整個<tr>
排
$(document).ready(function(){
$("#report > tbody > tr.odd").click(function(){
$(this).next("#report tr").fadeToggle(600);
});
});
要像做(不工作)
$(document).ready(function(){
$("#report > tbody > tr.odd > td.selected").click(function(){
$(this).next("#report tr").fadeToggle(600);
});
});