【发布时间】:2018-06-15 20:48:40
【问题描述】:
我有一个目录
<table>
<thead>
<tr>
<th>First Name </th>
<th>Last Name </th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>John</td>
<td>Deo</td>
<td><a class="personal-checking-more-link">More</a></td>
</tr>
<tr><td style="display:none" colspan="3">Description goes for 1st row</td></tr>
<tr class="odd">
<td>Jaden</td>
<td>Aidan</td>
<td><a class="personal-checking-more-link">More</a></td>
</tr>
<tr><td style="display:none" colspan="3">Description goes for 2nd row</td></tr>
</tbody>
当我点击 More 时,将显示第一行描述。它显示完美,但 colspan 不起作用。
这是我的js代码
personalChecking = function () {
$('a.personal-checking-more-link').click(function() {
$(this).parent().parent().next().toggle('slow');
});
}
$(document).ready(personalChecking);
提前致谢
【问题讨论】:
-
@Sergio - 这个 4 岁的问题如何与一天前的问题重复?
标签: jquery