我可以使用 children() 和 parent() 但如果输入不是孩子和父母怎么办?
<table>
<tr>
<td>
<input type="checkbox" class="check">
<select style="display: none"><option>1</option><option>2</option></select>
<select style="display: none"><option>1</option><option>2</option></select>
<input type="text" style="display: none">
</td>
</tr><tr>
<td>
<input type="checkbox" class="check">
<select style="display: none"><option>1</option><option>2</option></select>
<select style="display: none"><option>1</option><option>2</option></select>
<input type="text" style="display: none">
</td></tr><tr>
<td>
<input type="checkbox" class="check">
<select style="display: none"><option>1</option><option>2</option></select>
<select style="display: none"><option>1</option><option>2</option></select>
<input type="text" style="display: none">
</td></tr><tr>
<td>
<input type="checkbox" class="check">
<select style="display: none"><option>1</option><option>2</option></select>
<select style="display: none"><option>1</option><option>2</option></select>
<input type="text" style="display: none">
</td>
</tr>
</table>
如果我用类检查选中复选框,那么 2 选择和输入应该是可见的。我怎样才能用 jQuery 制作?
小提琴:http : //jsfiddle.net/ykyNq/1/