2014-09-30 40 views
1

我试图将TB3与DataTables集成为this example show,但我无法获得它,因为您可能会在附图上看到它。无法将Datatables与Bootstrap 3集成

enter image description here

什么是不工作? select元素没有应用TB类,也与搜索框和最后的上一个|下一个按钮一样。我在这里做的唯一的事情就是添加dataTableBootstrap.js脚本和dataTableBootstrap.css风格,其余的是一个共同的TB3表格标记:

<table class="table table-striped table-hover table-condensed" id="dataTable"> 
    <thead> 
     <tr> 
      <th></th> 
      <th>Tipo de Trámite</th> 
      <th>No. Solicitud</th> 
      <th>Tipo de Solicitud</th> 
      <th>Estado</th> 
      <th>Fecha</th> 
      <th>Acciones</th> 
     </tr> 
    </thead> 
    <tbody> 
     ... something goes here 
    </tbody> 
</table> 

如果我通过Chrome的调试页面,我可以在控制台中看到这样的错误:

Uncaught TypeError: Cannot read property 'pageButton' of undefined dataTables.bootstrap.js:38

是对plugin/script过时的或我在这里失去了一些东西?任何帮助或建议?

回答

2

看起来这是影响从9th July until patched on the 27th August 2014.

周围释放的问题,您正在使用的环节是数据表的插件,这是打破了分页的一个非常具体的版本。

您将要使用的数据表CDN页面上引用链接 - 而不是那些你可能已经示例代码网页上找到:

http://cdn.datatables.net/

,以供参考latest version found是:

CSS:http://cdn.datatables.net/plug-ins/a5734b29083/integration/bootstrap/3/dataTables.bootstrap.css

JS:http://cdn.datatables.net/plug-ins/a5734b29083/integration/bootstrap/3/dataTables.bootstrap.js

+2

它不工作我使用的是一个你离开这里,我得到了相同的结果 – ReynierPM 2014-09-30 14:40:53