如何排除我在下面创建的jquery的click事件中的第一个td?我想排除生成对话框的单击事件上的所有行的第一个td.
jQuery("#list tbody tr").click(function(){
//some code here
});
<table>
<tr>
<td>first</td>
<td></td>
<td></td>
</tr>
<tr>
<td>first</td>
<td></td>
<td></td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
And*_*ker 15
如何使用first-child选择器结合:not:
jQuery("#list tbody tr td:not(:first-child)").click(function(){
//some code here
});
Run Code Online (Sandbox Code Playgroud)
示例: http ://jsfiddle.net/Rq8Xf/
| 归档时间: |
|
| 查看次数: |
11085 次 |
| 最近记录: |