0
我想重新命令使用Jquery.inner的內部html錶行。html包含嵌套表。我需要重新排序與子表和父錶行父表本身重新排序子錶行使用Jquery嵌套表排序順序
我的表層次是指以下鏈接http://jsfiddle.net/PcDPr/
我使用嵌套表插件also..nothing幫助很多..我沒有得到預期的結果。
我將不勝感激任何幫助。
我想重新命令使用Jquery.inner的內部html錶行。html包含嵌套表。我需要重新排序與子表和父錶行父表本身重新排序子錶行使用Jquery嵌套表排序順序
我的表層次是指以下鏈接http://jsfiddle.net/PcDPr/
我使用嵌套表插件also..nothing幫助很多..我沒有得到預期的結果。
我將不勝感激任何幫助。
你好樣品演示這裏:http://jsfiddle.net/T4Vh4/
要開始與你缺少在你的例子<th>
標籤。我爲您提供了一個工作示例,以便您可以將桌面分揀機的實施與演示進行比較。 :))
請讓我知道這是你在找什麼!
良好讀取:http://tablesorter.com/docs/
希望這有助於和有一個很好的一個,科特迪瓦恩不要忘記接受的答案,如果這有助於:)!
HTML
<table class="tablesorter">
<thead>
<tr>
<th>Make</th>
<th>Model</th>
</tr>
</thead>
<tbody>
<tr>
<td>Honda</td>
<td>Accord</td>
</tr>
<tr class="expand-child">
<td colspan="2" style="padding: 0 30px 0 30px;">
<table class="tablesorter-child">
<thead>
<tr>
<th>Doors</th>
<th>Colors</th>
</tr>
</thead>
<tbody>
<tr>
<td>Honda 2-Door</td>
<td>Honda Red</td>
</tr>
<tr>
<td>Honda 4-Door</td>
<td>Honda Blue</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>Toyota</td>
<td>Camry</td>
</tr>
<tr class="expand-child">
<td colspan="2" style="padding: 0 30px 0 30px;">
<table class="tablesorter-child">
<thead>
<tr>
<th>Doors</th>
<th>Colors</th>
</tr>
</thead>
<tbody>
<tr>
<td>Toyota 2-Door</td>
<td>Toyota Yellow</td>
</tr>
<tr>
<td>Toyota 4-Door</td>
<td>Toyota Green</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
jQuery代碼
$(document).ready(function()
{
$("table").tablesorter({selectorHeaders: '> thead > tr > th'});
});
參考下面鏈接你的例子不工作http://jsfiddle.net/bkxpk/..i需要添加任何這個插件 – Rachana
@Rachana ??這是什麼jsfiddle哈哈:)任何歷史或解釋。麥片! –
在IE中打開鏈接 – Rachana