小编Deb*_*ish的帖子

如何让数据表每2分钟自动刷新一次

我正在 2 分钟后自动刷新创建收件箱邮件,这会在数据表中显示新邮件。如何刷新我的数据表?

html ruby-on-rails-4 datatables-1.10

2
推荐指数
1
解决办法
1万
查看次数

无法读取未定义的属性“ Api”来加载响应数据表.js

我正在尝试在datatable..as中实现子行,如 https://datatables.net/extensions/sensitive/examples/child-rows/whole-row-control.html, 但现在我遇到一个错误,无法读取属性“ Api”未定义的 输入图像描述在这里

custom.js

 $(document).ready(function() {
   $('#example').DataTable( {
    responsive: {
        details: {
            type: 'column',
            target: 'tr'
        }
    },
    columnDefs: [ {
        className: 'control',
        orderable: false,
        targets:   0
    } ],
    order: [ 1, 'asc' ]
   } );
    } );
Run Code Online (Sandbox Code Playgroud)

index.html.erb

<table id="example" class="display nowrap" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th></th>
            <th>First name</th>
            <th>Last name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Age</th>
            <th>Start date</th>
            <th>Salary</th>
            <th>Extn.</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <th></th>
            <th>First name</th>
            <th>Last name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Age</th>
            <th>Start date</th>
            <th>Salary</th>
            <th>Extn.</th>
        </tr>
    </tfoot> …
Run Code Online (Sandbox Code Playgroud)

javascript datatables ruby-on-rails-4

0
推荐指数
1
解决办法
9975
查看次数