2014-02-18 106 views
0

我之前成功地使用了Datatables插件,现在我想在另一个站点上使用它,并且没有任何成功让它工作。DataTables jquery插件不工作

的CSS和JS被加载到页面ok了,我的表的ID对我来说很好,但我必须失去了一些东西......

这里是链接到我的网页http://pgh3.org/modx/top-runners.html

请参阅页面源代码,可以看出我已经注释了很多其他的JavaScript参考,因为我认为这些可能会干扰某种程度,但它似乎不是这种情况

+0

遗漏的类型错误:无法读取属性未定义jquery.dataTables.min.js的 '分拣':126 (匿名函数)jquery.dataTables.min.js:126 st.extend.each jQuery的1.9。 0.min.js:1 st.fn.st.each jquery-1.9.0.min.js:1 j jquery.dataTables.min.js:116 (匿名函数)top-runners.html:53 f jquery-1.9.0.min.js:1 p.fireWith jquery-1.9.0.min.js:1 st.extend.ready jquery-1.9.0.min.js:1 xt 此错误投掷 – Subbu

+0

请提供c直接在您的帖子上添加片段,而不是让用户离开网站查看错误。如果你能够在某种程度上缩小问题范围,你也可以让其他用户更好地帮助你。 – monojohnny

回答

0

您的控制台弹出此错误:

Uncaught TypeError: Cannot read property 'asSorting' of undefined 

尝试在表格中添加THEAD部分和TBODY部分。

<table id="runTable" border="0" align="center"> 
    <thead> 
     <tr> 
      <th>#</th> 
      <th>&nbsp;</th> 
      <th align="left">&nbsp;&nbsp;Name</th> 
      <th align="left">&nbsp;&nbsp;Hash Name</th> 
      <th align="center">Runs</th> 
     </tr> 
    </thead> 
    <tbody> 
     <!-- Your table body here --> 
    </tbody> 
</table> 
+0

非常感谢Felix,我认为它必须是简单的东西,但我正在盯着屏幕试图发现问题。 – Grogorio