jquery实现更改表格行顺序示例

2020-05-24 21:19:25易采站长站整理

表格部分如下:

<table class=”table” id=”test_table”>
    <thead>
        <tr>
               <th>时间</th>
            <th>详情</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        <tr cid=”7.0.0-2014-04-29_11-02-24_123″ class=”list_line”>
            <td>
                2014-04-29 11:02:24
            </td>
            <td>
                详情
            </td>
            <td>
                <span class=”move_btn glyphicon glyphicon-arrow-up” move_act=”up”></span>
                <span class=”move_btn glyphicon glyphicon-arrow-down” move_act=”down”></span>
            </td>
        </tr>
        <tr cid=”7.0.0-2014-04-29_11-02-24_915″ class=”list_line”>
            <td>
                2014-04-28 10:00:00
            </td>
            <td>
                详情
            </td>
            <td>
                <span class=”move_btn glyphicon glyphicon-arrow-up” move_act=”up”></span>
                <span class=”move_btn glyphicon glyphicon-arrow-down” move_act=”down”></span>