保证在引用jQuery之后引用之后的两个文件
<script type="text/javascript" src="<%=basePath%>/resource/js/jquery-1.8.2.min.js"></script> <link rel="stylesheet" href="<%=basePath%>/tablesorter/themes/blue/style.css" type="text/css" id="" media="print, projection, screen" /> <script type="text/javascript" src="<%=basePath%>/tablesorter/jquery.tablesorter.js"></script> <script type="text/javascript"> var jq = jQuery.noConflict();//最好写上,不然浏览器很容易报<span style="font-size:10px;"><span class="tcnt" style="color: rgb(102, 102, 102); font-family: 'Hiragino Sans GB W3', 'Hiragino Sans GB', 'Microsoft YaHei', 微软雅黑, Arial, Helvetica, simsun, 宋体; line-height: 38px;">Uncaught TypeError: Object #<Object> has no method 'fancybox'</span><span style="background-color: rgb(251, 251, 251); color: rgb(102, 102, 102); font-family: 'Hiragino Sans GB W3', 'Hiragino Sans GB', Arial, Helvetica, simsun, u5b8bu4f53;"> 的错</span></span> jq(function() { jq('#tbl_table').tablesorter({ debug : false }); }); </script>
给table一个ID值
<table width="100%" class="table" style="font-size: 12px;" id="tbl_table">
原文地址:http://blog.csdn.net/baidu_25310663/article/details/45920939