Jquery Tablesorter execution

Jquery Tablesorter execution

本文关键字:execution Tablesorter Jquery      更新时间:2023-09-26

我是jquery的新手,我已经下载了jquery表分类器插件并开始使用is。但是,jquery没有被应用,我不明白为什么。这是我的小提琴:

https://jsfiddle.net/5wcjd2fc/2/

<title>Population Change from 2000 to 2010</title>
<meta  charset="utf-8" />
<script type="text/javascript" src="js/jquery-1.12.2.min.js"> </script>
<script type="text/javascript" src="js/jquery.tablesorter.min"> </script>
<link rel="stylesheet" href="css/theme.grey.css">
<script type="text/javascript">
  $(document).ready(function() { 
    $("#population").tablesorter({
      theme: "grey",
      widgets: ['zebra']
    });   
</script>
<body>
<h1>Population Change from 2000 to 2010</h1>
<table id="population" class="tablesorter">

Tablesorter表需要包含thead和tbody标记。确保你的标题在ad内,并且你的可排序内容在tbody中。

其他一切看起来都很好。显然,请确保成功导入脚本文件。在开发人员控制台中键入$应该足以知道jQuery是否可用。