对表内的表进行排序
我是一个大表中的几个表,我使用 jquery tablesorter 对主表进行排序。
我也希望能够对主表中的各个表进行排序。示例代码:
<table class="info tablesorter" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th colspan>The Name</th>
<th>Geography</th>
<th colspan="5">Prospective clients</th>
</tr>
</thead>
<tbody>
<Tr class="parent" id="id_1" style='background-color: white'>
<TD style=vertical-align:middle>Main echo 1</td>
<TD style=vertical-align:middle>New York, NY</td>
<td colspan="5">55</td>
</tr>
<tr class="child-id_1 expand-child" style="display:none">
<td colspan='7'>
<table class="ctable_1 ts2" width=75% id="class_id_1">
<thead><tr>
<th>URL</th>
<th>Contact Page</th>
<th>Phone</th>
<th>GoogleIndex</th>
<th>Listed in next?</th>
<th>Created On</th>
</tr></thead>
<tbody>
<tr class='childofmarket'>
<td> xyz </td>
<td> aaa</td>
<td> ###-###-#### </td>
<td>127</td>
<td>- No -</td>
<td>03-09-2011</td>
</tr>
<tr class='childofmarket'>
<td> aak</td>
<td>csa</td>
<td>##########</td>
<td>69</td>
<td>- No -</td>
<td>03-09-2011</td>
</tr>
等等。我不断得到
错误:解析器[i]未定义
谁能告诉我这里需要修复什么吗?
I am several tables within a big table and I am using jquery tablesorter for sorting the main table.
I would like to be able to sort the individual tables within the main table as well. Example code:
<table class="info tablesorter" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th colspan>The Name</th>
<th>Geography</th>
<th colspan="5">Prospective clients</th>
</tr>
</thead>
<tbody>
<Tr class="parent" id="id_1" style='background-color: white'>
<TD style=vertical-align:middle>Main echo 1</td>
<TD style=vertical-align:middle>New York, NY</td>
<td colspan="5">55</td>
</tr>
<tr class="child-id_1 expand-child" style="display:none">
<td colspan='7'>
<table class="ctable_1 ts2" width=75% id="class_id_1">
<thead><tr>
<th>URL</th>
<th>Contact Page</th>
<th>Phone</th>
<th>GoogleIndex</th>
<th>Listed in next?</th>
<th>Created On</th>
</tr></thead>
<tbody>
<tr class='childofmarket'>
<td> xyz </td>
<td> aaa</td>
<td> ###-###-#### </td>
<td>127</td>
<td>- No -</td>
<td>03-09-2011</td>
</tr>
<tr class='childofmarket'>
<td> aak</td>
<td>csa</td>
<td>##########</td>
<td>69</td>
<td>- No -</td>
<td>03-09-2011</td>
</tr>
and so on. I keep getting the
Error: parsers[i] is undefined
Can anyone tell me what I need to fix here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不知道你是否尝试过,但给你所有的表相同的 IE 类。 sorted_table
请说出您正在使用哪个tablesorter,我更喜欢这个 Tablesorter
这在javascript中使用类似的东西
Don't know if you have tried but give all your tables the same class IE. sorted_table
please say which tablesorter you are using, I prefer this one Tablesorter
this in javascript use something like