jQuery数据表忽略了使用colspan的行

Gal*_*fau 2 jquery html-table

我有一个看起来像这样的表:

编辑:

<table id="results">
<thead>
    <tr>
        <th>ID</th>
        <th>NAME</th>
        <th>NUMBER</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td><a href="#" onclick="$('#user_1').toggle();">1</a></td>
        <td>JOHN</td>
        <td>311-123-4523</td>
    </tr>
    <tr id="user_1" class="hide">
        <td colspan="3">
        Some information about the user
        </td>
    </tr>
</tbody>    
</table>

<script>
    $(document).ready(function(){
        $('#results').dataTable({
            "sPaginationType": "bootstrap"
        });
    });
</script>
Run Code Online (Sandbox Code Playgroud)

注意:单击ID号,显示/隐藏详细信息行.

我在dataTable尝试使用colspan渲染表时遇到问题,我收到此错误

Uncaught TypeError: Cannot read property 'asSorting' of undefined 
Run Code Online (Sandbox Code Playgroud)

如果我删除详细信息行,datatable会使一切正常.

我想知道是否有可能告诉dataTable忽略如上所述的细节行.

mAr*_*5MB 5

我建议直接从datatable使用此解决方案

DataTables隐藏行详细信息示例

效果很好