2014-02-18 181 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