0
我有這個簡單的HTML頁面與一個可排序的表。我使用的tablesorter 2.17.8分鐘JQuery tablesorter:沒有表,thead,tbody或tablesorter已經
<html>
<head>
<link href="${pageContext.request.contextPath}/resources/css/base.css" rel="stylesheet"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/rules.js"></script>
</head>
<body>
<table id="rulesTable" class="tablesorter">
<tr>
.....
我rules.js有
$(document).ready(function() {
$("#rulesTable").tablesorter({
widthFixed : true,
showProcessing: true,
widgets: ['zebra', 'columns', 'stickyHeaders'],
debug: true,
theme: 'blue'
});
});
,但我不斷收到此錯誤,當我加載頁面
ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized jquery.tablesorter.min.js:5d jquery.tablesorter.min.js:5g.setup jquery.tablesorter.min.js:5(anonymous function) jquery.tablesorter.min.js:5n.extend.each jquery-2.1.1.min.js:2n.fn.n.each jquery-2.1.1.min.js:2g.construct jquery.tablesorter.min.js:5(anonymous function) rules.js:4j jquery-2.1.1.min.js:2k.fireWith jquery-2.1.1.min.js:2n.extend.ready jquery-2.1.1.min.js:2I jquery-2.1.1.min.js:2