0
我打算使用我的表的footable jQuery插件使它們響應,但我無法將它集成到我的網站。這是我的CSS:對象[對象對象]沒有方法'腳下'
<link href="FooTable-2/css/footable.core.css?v=2-0-1" rel="stylesheet" type="text/css"/>
<link href="FooTable-2/css/footable.metro.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script src="FooTable-2/js/footable.js?v=2-0-1" type="text/javascript"></script>
<script src="FooTable-2/js/footable.sort.js?v=2-0-1" type="text/javascript"></script>
<script src="FooTable-2/js/footable.filter.js?v=2-0-1" type="text/javascript"></script>
<script src="FooTable-2/js/footable.paginate.js?v=2-0-1" type="text/javascript"></script>
<script src="build/javascripts/application.js" type="text/javascript"></script>
JS:
<script type="text/javascript">
$(function() {
$('.footable').footable();
});
</script>
HTML:
<table class="footable">
<thead>
<tr>
<th></th>
<th data-hide="phone,tablet">Nummer</th>
<th>Vorname</th>
<th>Nachname</th>
<th>Adresse</th>
<th data-hide="phone,tablet">Telefon</th>
<th>E-Mail</th>
<th data-hide="phone,tablet">Geburtstag</th>
<th>Kundentyp</th>
</tr>
</thead>
<tbody>
錯誤:
$('.footable').footable();
Uncaught TypeError: Object [object Object] has no method 'footable'
控制檯:
我該如何解決這個問題?
確保您的腳本引用是正確的。檢查您的瀏覽器開發工具的網絡選項卡是否有404錯誤。 –
顯然,插件沒有被加載。控制檯中應該有其他錯誤告訴你爲什麼。 –
沒有404錯誤。我之前檢查過。 – doonot