在tableorter分页中的虚拟行

时间:2015-01-20 13:05:38

标签: jquery tablesorter

我是具有寻呼机小部件的集成表分类器,我在表行之间有一些信息块行,我不想使用分组小部件。假设我的表有行“myinfo”的行,这个我的信息需要从表格分类器寻呼机数量和总行数中排除

<table id="archived">
    <thead>
        <tr>
            <th>period</th>
            <th>period1</th>
            <th>Reason</th>
        </tr>
    </thead>
    <tbody>
        <tr class="myinfo">
            <td>Today</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>1</td>
            <td>New</td>
            <td>new 1</td>
        </tr>
        <tr>
            <td>1</td>
            <td>New</td>
            <td>new 1</td>
        </tr>
        <tr>
            <td>1</td>
            <td>New</td>
            <td>new 1</td>
        </tr>
        <tr class="myinfo">
            <td>Next week</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>3</td>
            <td>New</td>
            <td>dummy</td>
        </tr>
        <tr>
            <td>3</td>
            <td>New</td>
            <td>dummy</td>
        </tr>
        <tr>
            <td>3</td>
            <td>New</td>
            <td>dummy</td>
        </tr>
        <tr>
            <td>3</td>
            <td>New</td>
            <td>dummy</td>
        </tr>
        <tr class="myinfo">
            <td>Last week</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>5</td>
            <td>New</td>
            <td>work</td>
        </tr>
        <tr>
            <td>5</td>
            <td>New</td>
            <td>work</td>
        </tr>
        <tr>
            <td>5</td>
            <td>New</td>
            <td>work</td>
        </tr>
    </tbody>
</table>
<div id="pager" class="pager paginator" style="text-align: left;padding-top:5px;"> <span class="pagedisplay"></span>&nbsp; <a href="javascript:void(0)"><img src="/s.gif" class="prev" alt="Previous" title="Previous"></img></a>

http://jsfiddle.net/791twctz/

1 个答案:

答案 0 :(得分:0)

您需要做的就是包含一个类名为“tablesorter-infoOnly”的tbody - 由cssInfoBlock optiondemo)设置 - 在寻呼机块之前或之后;寻呼机知道忽略这些物体。

<tbody class="tablesorter-infoOnly">
    <tr>
        <td colspan="7">Extra Information Row</td>
    </tr>
    <!-- add more than one row, if desired -->
</tbody>